Herbert,
We are a little unclear about your scenario. We suspect that your requirement is
to change while hovering the cursor for the drag-and-drop restricted item. If
yes it will be achievable by using the
ItemDragOver
and ItemDropping events are shown below,
private void treeView_ItemDropping(object sender,
TreeViewItemDroppingEventArgs e)
{
var record = e.TargetNode.Content as Model;
if (record.Header == "Asus")
e.Handled = true;
}
private void
treeView_ItemDragOver(object sender, TreeViewItemDragOverEventArgs e)
{
var record = e.TargetNode.Content as Model;
if (record.Header == "Asus")
e.DropPosition =
Syncfusion.UI.Xaml.TreeView.DropPosition.None;
}
|
For more information related to drag-and-drop events, please
refer to the below user guide documentation link,
UG Link: https://help.syncfusion.com/wpf/treeview/drag-and-drop#disable-dropping-on-certain-items-in-wpf-treeview
If we misunderstood your requirement, please provide more information regarding
the requirement. This would help us to proceed further.
Attachment:
SfTreeViewDemo_4ea6e05c.zip