Search code examples
c#wpfdrag-and-drop

C#: Drag & Drop with right mouse button


I'd like to do Drag & Drop with the right mouse button instead with the left one. However calling

DragDrop.DoDragDrop()

from MouseRightButtonDown instead of MouseLeftButtonDown doesn't do the job - DragDrop.DoDragDrop looks for mouse movements while holding down the left mouse button. Any idea how to realise Drag & Drop using the right mouse button? Thanks for any hint!


Solution

  • You need to make use of DragDrop.AddQueryContinueDragHandler().