WPF中的多拖放 - 示例/示例/教程?

时间:2011-01-10 12:20:37

标签: c# wpf mvvm

我正在寻找一个示例或任何现成的解决方案,我可以将其集成到我现有的应用程序中并使用多拖放功能。我在互联网上发现的大多数解决方案在将多个项目从ListBox等控件拖放到另一个ListBox时效果不佳。有谁能指出我的解决方案?我正在使用WPF - C# - MVVM

谢谢,

1 个答案:

答案 0 :(得分:2)

检查这是否有帮助

http://www.codeproject.com/KB/WPF/WPF_MultiSelect_DragDrop.aspx

修改

GongSolutions.Wpf.DragDrop library是WPF的拖放框架。它具有以下特点:

* Works with MVVM : the logic for the drag and drop can be placed in a ViewModel. No code needs to be placed in codebehind, instead attached properties are used to bind to a drag handler/drop handler in a ViewModel.
* Works with multiple selections.
* Can drag data within the same control to re-order, or between controls.
* Works with TreeViews.
* Can insert an item into a collection, or drop one item onto another.
* Can display Adorners to give the user visual feedback of the operation in progress.
* Has sensible defaults so that you have to write less code for common operations. 

试一试