views:

569

answers:

4

Hi,

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?

+3  A: 

Drag&drop is not SO hard, really :) try reading this http://www.beacosta.com/blog/?p=53 post on drag&drop.

Neverrav
A: 

@Neverrav thank you, I'll look into that :-)

TimothyP
+1  A: 

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"/>
rudigrobler
+1  A: 

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!

Groky
I will take a look at it... but it might take some time, thank you
TimothyP