Drag and drop example?

2020-02-03 09:32发布

问题:

I have a simple question,I searched the internet already but i can't really find an example. I just need something simple: I have 2 listviews and i want to have drag and drop. But it has to be in WPF and MVVM. The examples i found weren't that clear.I have problems with handling the events. Someone who can help me out and give a good link to a nice example or tutorial?

回答1:

Take a look at GongSolutions.Wpf.DragDrop. Is a drag'n'drop framework for WPF. It works with MVVM, multiple selections, TreeViews... and very easy to use.

Here are two tutorials:

  • Drag and Drop in WPF
  • Drag and Drop in WPF - Part II