views:

313

answers:

1

I'm trying to write a WPF control that has similar functionality to the Windows Sidebar. The functionaly I would like to replicate is the drag and drop ordering. When dragging an item the other items move out of the way to show you where the item will end up when dropped.

Has anyone else had to implement this sort of functionality, if so how did you go about it?

+1  A: 

I've been meaning to write something like that myself, but haven't quite gotten there yet. Take a look at Bea Stollnitz's drag and drop post. The insert adorner isn't the main focus of her post, but she discusses it.

Lee Roth
I've used Bea's code in a side project I'm working on at home - it works, but I'm having a bit of trouble modifying it. It definitely does listbox re-ordering fine, but it is hard to add additional functionality to it.
Jamie Penney
I've had a look at Bea's code and its the sort of thing I'm looking for. However I want the items to move around as you're dragging to show the user where the item will end up when dropped. This sort of behaviour requires the layout of the existing items to change, which I don't believe you can't do with adorners.
Jon Mitchell