This question is locked. New answers and comments are not allowed.
I need a little help. I have a RadTreeView and want to be able to drag 1 item into an area (a border control). I set AllowDrop to true, and added a DropHandler. The DropHandler event fires, and I am able to get the dragged item and add content to the border. This works just fine. However, when dragging over the border, the not-allowed icon is displayed (circle with line), and the Drag cue is empty.
How can I make the drag cue say something like "drop in section a", and not show the not-allowed icon?
public TestControl()
{
InitializeComponent();
DragDropManager.AddDragOverHandler(this.brdDropArea, OnDragOver);
DragDropManager.AddDropHandler(this.brdDropArea, OnDrop);
}
private void OnDragOver(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
var x = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;
if (x != null)
{
// ?????
x.DragVisual = new TextBlock() { Text = "Drop Here" };
x.DropAction = DropAction.Copy;
x.UpdateDragVisual();
e.Effects = DragDropEffects.All;
e.Handled = true;
}
}
private void OnDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
// Handle Drop Code
)
<StackPanel> <telerik:RadTreeView x:Name="treeView" AllowDrop="False" telerik:TreeViewSettings.DragDropExecutionMode="New" > </telerik:RadTreeView> <Border x:Name="brdDropArea" Width="200" Height="20" BorderBrush="#666666" BorderThickness="1" AllowDrop="True" /></StackPanel>