Reputation: 21765
Been trying to find a working implementation of a WPF listview (or listbox) where you can order items by dragging them up or down.
I have found a few, but none really works, for example this one http://www.codeproject.com/KB/WPF/ListViewDragDropManager.aspx?msg=2765618#xx2765618xx stops working once you have list where you need to scroll down to get to the last items.
Why is Drag&Drop so hard in WPF? Does anybody know a working control?
Upvotes: 2
Views: 1403
Reputation: 2165
Drag&Drop is not SO hard, really :)
Try reading this post about Drag&Drop.
Upvotes: 2
Reputation: 16546
I've been struggling with WPF drag and drop for a while now and decided to just bite the bullet and create a framework for it.
You can find the code here: http://code.google.com/p/gong-wpf-dragdrop/
I’d love to get some feedback on this, hopefully it will solve your problem!
Upvotes: 0
Reputation: 17143
Also check out this article on CodeProject!
It is not as full featured as Josh & Bea's implementation but it is very simple to use...
This implementation rely on attached properties (Attached behaviour)
Source
<ListBox src:DragAndDrop.DragEnabled="true"/>
Target
<ListBox src:DragAndDrop.DropEnabled="true"/>
Upvotes: 1