Hello,
I have Multiple Content controls each living in a content pane. The content panes live on a Split Pane. The Split Panes live in a XamDockManager.Panes collection. Each of the content controls contains a xamdatatree. Should I be able to drag/drop between the trees living in the different content controls? If so, how is this accomplished? I've set each of the tree's node layouts contain IsDraggable="True" and IsDropTarget="True". I've placed DragDropManager.DragSource elements at various locations in the logical tree, but the target window never appears to receive an event. I don't see an example for dragging between controls - only dragging within a tree. This seems to work fine.
Thanks,
Chris
Hi Chris,
I'm researching this for you and will post back here when I have more information.
You should be able to set the tree or specific nodes to IsDraggable="True" and IsDropTarget="True".
And it should work properly whether the tree in a content pane or not.
I tried to reproduce using a dockManager with contentPanes inside SplitPanes. In my design, I put a tree in a content pane in each split pane and had no issues dragging and dropping nodes from one tree to the other.
You do have to make sure that the node you are dragging is the same object type as the node collection that you are dropping it into.
If you would like to give me a sample I can take a look and see if I can identify any issues.
One other thing, you don’t need to add the DragDropManager to the tree nodes since you are setting the IsDraggable and IsDropTarget properties.
Hi Marianne.
Thanks for getting back to me. Is it possible for you to send me your sample project so I can see if you have addressed my problem?
Still using my sample and having made Pane1 a floating pane, I can drag chapters from any of the books in my treeand add them to the docked pane's (Pane 4) chapter nodes. The issue arises when you try to drag from a docked pane to the floating pane.
I believe the behavior is caused by the floating panel not being able to receive focus and this would be expected behavior.
Let me know if you are seeing a different behavior.
Marianne,
Thanks for the sample - it is much appreciated. When the source panel is not docked the drag drop doesn't work. Is this expected behavior?
Here’s a sample that you can use to drag and drop the chapters between the books, within the same tree or between the trees in the separate split panels.
Let me know if you have any questions.