Hi, so I'm wondering how I can check for that and disable the drop under some circumstances. I've already tried all the drag and drop events that make sense to me in the TreeView (DragEnter, DragStarted DragOver, PreviewDragEnter, PreviewDragStarted, PreviewDragOver), so when I start dragging and I move the dragged object around, none of this events get fired. I also tried an approach with the RadDragAndDropManager here:
But to my surprise, the OnDropInsideTreeViewDropQuery event never got fired. Am I missing something here?
What I want to do is pretty simple. I have several types of objects in my treeview, say:
Junkyards
Junkyard 1
Cars
Toyota Corola
Nissan Sentra
Furniture
Stove
Desk
Computers
Dell Inspiron
HP a2921
Junkyard 2
Cars
Toyota Corola
Nissan Sentra
Furniture
Stove
Desk
Computers
Dell Inspiron
HP a2921
So if the user drags a car from Junkyard1 to Junkyard2 and hovers it over Computers, basically I wan't to show a NO cursor, but if he does drag it over the Cars node, then it should allow him to drop there. The Junkyards cannot be dragged, so I need to check if the user is trying to drag a Junkyard and not allow him to.
Please keep in mind that I'm not doing the TreeView filling in code or XAML, the data is coming from an XML document, so I can't just go to each RadTreeViewItem and set the IsDropAllowedProperty to false, it has to be done programmatically through the events.
Thanks!