Hi.
I have looked at the following post but it is not doing what I want.
http://es.infragistics.com/community/forums/p/72171/365708.aspx#365708
I am trying to allow nodes in a XamDataTree, either parent or child to be dragged to another control, such as a standard WPF ListBox. So far we have tried:
HI,
I am attaching a sample that drags a treenode to a usercontrol containing a listbox.
Please review my sample.
As I mentioned in my post I looked at this example which was provided by the link but it does not work correctly as it does not have the context of the node.
Hi Matt,
Have opened your sample and it is different to the other example, it had the same name so assumed the same, I am trying it my end now.
Many thanks,
Anne
Please let me know if you need further assistance regarding this issue.
Hi
I need to have Drag and Drop functionality between a XamDataTree and another control (e.g. ListBox) in both directions as well as WITHIN the XamDataTree.
When playing with the sample provided in this thread i could always get some of the dragging working but not all of them.
Would it be possible to extend this demo so that dragging is enabled in both ways and also within the tree?
Thanks,
Hello Ofer,
Thank you for your post. I have been looking into it and I modified the sample Matt uploaded, so now it has the functionality you want. Basically I created an ItemTemplate for the ListBox and make the TextBlock inside draggable. This way I was able to drag it and drop it in the XamDataTree. I also add a check in the XamDataTree's NodeDrop event handler to see if the DropTarget is ListBox and if not I let the XamDataTree make its built in DragDrop of Nodes.
Hello Seth,
I have been looking into Matt's sample and I modified it, so now it works as you want. Basically I created a separate Drag and Drop using Infragistics DragDrop Framework. Please note that this way the built in drag and drop of the XamDataTree won't work. If you want to be able to reorganize the nodes inside the data tree you have to create your own drag drop functionality.
Hi Stefan,
Here's a video capture of the Infragistics demo program (WpfApplication191) provided at the top of this thread by Matt. It shows the same behavior I'm seeing. Note that I'm on 12.2 at this time.
http://screencast.com/t/2sAL30tuwXS
Thank you.
Seth
Hello,
By default there is a "plus" cursor when you hover over a valid drop target, so I assume there is some issue with your drag and drop logic. If you send me a sample project where this is reproducible I would be able to investigate it further for you.
Looking forward for your reply.
I have reviewed the sample and the documentation. Both provide information as to how set custom cursors. The problem I seem to be having is the cursor is not changing, whether customized or not, when I drag a tree node over the XamTextEdit target. Do I need to set a custom cursor to achieve the behavior I'm looking for? Is there not a standard cursor that appears when hovering over a drop target?
Below is a link to a short video demonstrating what I'm seeing. Note that the standard drag cursor does not change when hovering over the drop target.
Thanks.
http://screencast.com/t/Of4B23kZi
Thank you for your post. I have been looking into it and I can suggest you see the sample in the Samples Browser under Drag and Drop Framework / Style / Custom Cursors section, where it is shown how to apply custom cursor. Also here you can read more about this:
http://help.infragistics.com/Help/Doc/WPF/2012.1/CLR4.0/html/Infragistics_Drag_and_Drop_Framework_Set_Custom_Cursors_for_Different_Drag_and_Drop_Situations.html
Please let me know if you have further questions on this matter.