问题描述
我正在寻找一个简单的 ListBox
内置 Drag &降低.我认为 Silverlight 4 Toolkit 具有 类似的东西.
I'm looking for just a simple ListBox
with build-in Drag & Drop. I think that Silverlight 4 Toolkit has something like that.
BoxList
应该能够:
- 通过拖动 &掉落物品
- 将项目从一个
BoxList
拖到另一个 - 显示拖拽项目的预览(幻影版)
- 显示放置位置(如将插入拖动的项目之间的一条线)
我希望微软有一些解决方案(例如在工具包中),但如果没有,我对任何可行的解决方案都很满意.例如,我徘徊在 DataGrid 列标题重新排序(通过拖放它们)实现中使用了什么控件.
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.
感谢您的任何建议
请不要建议商业控制.这不是商业项目,我不想买.谢谢
Please do not suggest commercial controls. This is not for a commercial project and I don't want to buy it. Thank you
推荐答案
ListBox中的build可以实现拖放,你只需要处理拖放操作即可.
The build in ListBox can implement drag and drop, you just have to handle the drag and drop operations.
我使用 going-wpf-dragdrop 库
它还包含在 WPF 应用程序中使用它的示例
It also contains examples of using it within a WPF application
这篇关于WPF 的拖放列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!