WPF C#: Rearrange items in listbox via drag and drop

前端 未结 7 1052
你的背包
你的背包 2020-11-27 12:08

I am trying to figure out how to move the items in a pre-populated listbox up and down via mouse drags.

I have looked at the Control.DoDragDrop method from microsof

相关标签:
7条回答
  • 2020-11-27 13:09

    I would suggest using the drag and drop behavior called GongSolutions.WPF.DragDrop. It allows MVVM style use cases using attached property setters to enable it, no need for code behind in your views. You should check out the link for a simple example.

    0 讨论(0)
提交回复
热议问题