WPF 拖放列表框
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21829659/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
WPF drag drop listbox
提问by jayars
I'm looking for a WPF drag drop library/article/tutorial that can:
我正在寻找一个 WPF 拖放库/文章/教程,它可以:
- Drag/drop to reorder list box items
- Animate the panel as item is dragged (as shown in screen shot)
- 拖放以重新排序列表框项目
- 拖动项目时为面板设置动画(如屏幕截图所示)
I've had a quick look at Telerik's DragDropManager, which comes with ListBoxDragDropBehavior. It provides drag/drop reordering, but not quite the behaviour as in my screenshot.
我快速浏览了 Telerik 的 DragDropManager,它带有 ListBoxDragDropBehavior。它提供拖放重新排序,但不像我的屏幕截图那样完全。
I would love to learn to write one from scratch eventually (adorners, animated panels, etc), but I'm currently time-constrained to using out-of-the-box libraries.
我很想学习最终从头开始编写一个(装饰器、动画面板等),但我目前时间有限,只能使用开箱即用的库。




[edit]
[编辑]
The behaviour I'm looking for is the same as Windows 8's start screen
我正在寻找的行为与 Windows 8 的开始屏幕相同


回答by KornMuffin
Check out Moving WPF DataGrid Rows using Drag and Dropwhich shows how to reorder DataGrid rows via drag drop and how to customize the drag indicator.
查看使用拖放移动 WPF DataGrid 行,其中显示了如何通过拖放重新排序 DataGrid 行以及如何自定义拖动指示器。

