[英]WPF MVVM C#: listbox drag and drop without code behind
I'm trying to figure out how to reorder the listbox without any code behind. 我试图弄清楚如何重新排序列表框而没有任何代码。 I tried following this post: WPF C#: Rearrange items in listbox via drag and drop It definitely works, but I want to do it with ICommand or AttachBehavior.
我尝试了以下帖子: WPF C#:通过拖放重新排列列表框中的项目确实可行,但是我想使用ICommand或AttachBehavior做到这一点。
Any suggestion? 有什么建议吗? How to hook the Drop and PreviewMouseLeftButtonDownEvent with AttachBehavior?
如何使用AttachBehavior挂钩Drop和PreviewMouseLeftButtonDownEvent?
The Listbox's ItemsSource is a Observable Collection. 列表框的ItemsSource是一个Observable集合。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.