Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
Drag&Drop between XamDataTrees
posted

Hello,

could anybody please give me an example on how to drag&drop between two XamDataTrees on the same page? I've set up the drag&drop manager on both trees like this, but none of the events are fired when I drag or drop an element from the other tree over this tree (Drag&Drop within each tree works fine):
<DataTemplate >
<StackPanel Orientation ="Horizontal" >
<Image Source="{Binding Data.Image}" VerticalAlignment="Center"/>
<TextBlock Margin="3,0,0,0" Text="{Binding Data.Label}" VerticalAlignment="Center"></TextBlock>
<ig:DragDropManager.DragSource>
<ig:DragSource IsDraggable="{Binding Data.IsNotRoot}" DragChannels="altTree" DragEnter="DragSource_DragEnter" DragStart="DragSource_DragStart_Alt" DragOver="DragSource_DragOver_Alt" Drop="DragSource_Drop_Alt" DataObject="{Binding Data}"/>
</ig:DragDropManager.DragSource>
<ig:DragDropManager.DropTarget>
<ig:DropTarget IsDropTarget="True" DropChannels="altTree, mainTree" />
 </ig:DragDropManager.DropTarget>
</StackPanel></DataTemplate>

 

  • 138253
    Offline posted

    Hello,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I created a sample project for you with the functionality you want.

     

    Feel free to write me if you have further questions.

    DragDropBetweenTrees.zip