WPF : Reorder WrapPanel content via drag and drop? WPF : Reorder WrapPanel content via drag and drop? wpf wpf

WPF : Reorder WrapPanel content via drag and drop?


I've written a library which may help: default behaviour is to allow re-ordering within the same control:

http://code.google.com/p/gong-wpf-dragdrop/

Ah I notice you're talking about just a WrapPanel: you'll need to use an ItemsControl with a WrapPanel:

<ItemsControl.ItemsPanel>    <ItemsPanelTemplate>        <WrapPanel />    </ItemsPanelTemplate></ItemsControl.ItemsPanel>


A wrap panel won't give you the functionality you are looking for since it is just for layout. Instead look at adding the drag and drop functionality to a ListBox and change the ItemsPanelTemplate of that ListBox to use a wrap panel.