Drag and Drop ListBox for WPF(WPF 的拖放列表框)
问题描述
我正在寻找一个简单的 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 的拖放列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:WPF 的拖放列表框


基础教程推荐
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01