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 的拖放列表框
基础教程推荐
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- WPF 模态进度窗口 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
