Drag and Drop ListBox for WPF

江枫思渺然 提交于 2019-12-06 06:24:46

问题


I'm looking for just a simple ListBox with build-in Drag & Drop. I think that Silverlight 4 Toolkit has something like that.

The BoxList should be able to:

  • reorder by dragging & dropping items
  • drag item from one BoxList to another
  • display preview (ghost version) of dragged item
  • show drop location (like a line between items where the dragged will be inserted)

I hope there is some solution from microsoft (in toolkit for example), but if not I all be happy with any working solution. For example I wander what control was used in DataGrid column headers reordering (by dragging and dropping them) implementation.

Thank you for any suggestions

EDIT: Please do not suggest commercial controls. This is not for a commercial project and I don't want to buy it. Thank you


回答1:


The build in ListBox can implement drag and drop, you just have to handle the drag and drop operations.

I use the going-wpf-dragdrop library

It also contains examples of using it within a WPF application



来源:https://stackoverflow.com/questions/4704358/drag-and-drop-listbox-for-wpf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!