I bit confused on how to change the templates when drag'n'drop a node in the XamDataTree. Suppose I have one NodeLayout and i have set the Itemtemplate and EditorTemplate how can i use the DragDropManager to change the DragDrop templates? In the XamDataTree or in the NodeLayout? Can you give me a small sample?
Thanks!
Hi George,
sorry for the late reply.
This might be an issue with the dataTree(when current cursor is CopyCursor and the mouse leave the tree on its left side, the cursor seem to get updated when the mouse goes right of the dataTree). I'll investigate this in more detail so I could confirm its an issue or find the right way to do it. I'll get back to you soon.
One question: How can I handle the DropNotAllowedCursor and CopyCursor? What I mean is to show the appropriate cursor when need it. In the example, if you drag and move the cursor outside of the window, the cursor want change to DropNotAllowedCursor (if the current cursor is CopyCursor). I've set the dragChannel and dropchannel for the treeview but this does not have the effect I want. Any help?
Thanks again
George
Hi Konstantin, thanks for the sample, works great!
XamDataTree's APi gives some control over default templates with regard to node dragging but only through its node dragging events - i.e. NodeDraggingStart - where you have the ability to customize the default templates through the event arguments.
Please find the attached sample solution where I've basically extended the XamDataTree and NodeLayout classes so you could be able to provide these templates as property to the NodeLayout. Basically when the XamDataTree is firing NodeDraggingStart we are change the DragTemplate pulling it from the Extended NodeLayout where a DragTemplate property was defined.
Please let me know if you need more assistance with this.