WPF拖放列表框 [英] Drag and Drop ListBox for WPF
问题描述
我正在寻找一个简单的 ListBox
,内置Drag&下降。我认为Silverlight 4工具包有一个类似的内容。
BoxList
应该能够:
- 通过拖动重新排序从
BoxList
拖动项目 - 将项目拖动到另一个
- 显示预览(ghost版本)拖放项目
- 显示放置位置(如插入拖动项目之间的一行)
我希望微软有一些解决方案(例如在工具包中),但是如果不是,我都对任何工作解决方案感到满意。例如,我漫步在DataGrid列标题中使用了什么控件(通过拖放它们)实现。
感谢您的任何建议
编辑:请不要建议商业控制。这不是一个商业项目,我不想买它。谢谢
ListBox中的构建可以实现拖放,只需要处理拖放操作。 p>
我使用 going-wpf- dragdrop 库
它还包含在WPF应用程序中使用它的示例
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
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
这篇关于WPF拖放列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!