Nov 2 2007 4:10PM GMT
Posted by: MarkWPF
WPF
Drag and drop by hand
Posted by: MarkWPF
Drag and drop in WPF is very similar to that in Windows Forms – very very very similar
If you don’t want to use Josh Smith’s great DragDropManager, either because you want to do multi-select or you want to use a data type other than the type used as an item in the listview, here is what you need to do:
- The ListView that you want to have items dropped needs to have the property AllowDrop set to true
- You need to implement MouseMove event to do the actual drag drop
- You need to implement Drop to actually process the result of what to do when the data is dropped
And that is it




