Hello!
I'm currently trying to drag and drop a node from a XamDataTree to a WPF UserControl.
I'm not really into the Drag&Drop topic and just wondered if it is possible to trigger an event in the UserControl when the node has been dropped.
At the moment all I achieved is triggering the NodeDragDrop event on the XamDataTree with following code:
<ig:XamDataTree NodeDragDrop="xamDataTree1_NodeDragDrop" IsDraggable="True" IsDropTarget="True" Name="xamDataTree1" VerticalAlignment="Top" ><ig:XamDataTree.GlobalNodeLayouts><ig:NodeLayout Key="ContinentLayout" TargetTypeName="Continent" DisplayMemberPath="Name"/></ig:XamDataTree.GlobalNodeLayouts></ig:XamDataTree>
I'd like to have something like <UserControl NodeDropped="UserConctrol_NodeDropped"/>
private void UserConctrol_NodeDropped(object sender, DropEventArgs e){ var x = e.Data;}
Hello Nicolas,
I have reviewed your question regarding how to drags a treenode to a usercontrol and I suggest to take a look at the following forum thread where similar behavior was discussed:
https://ko.infragistics.com/community/forums/t/84559.aspx
Please let me know if you have any questions.
Sincerely,ZhivkoAssociate Software Developer
Hello Zhivko,
thanks for you reply!
I looked at this thread and its samples and there is an event triggered in the DragSource when a node is dropped. But I'm looking for a similar event that would be triggered in the DragTarget. I don't know if this is even possible. But in that way my DragTarget could decide what to do with the dropped data and the source would'nt care about it at all.
But if that's how it is supposed to be done, then I will have to deal with that.