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 的拖放列表框


- 如何用自己压缩一个 IEnumerable 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- 输入按键事件处理程序 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01