Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

DoDragDrop oddity with Right Mouse Button

$
0
0

Hi all,

More experimentation - today with Drag & Drop.

Everything seems fine when performing this with the left mouse button, but when initiating this from WPF
with the right mouse button it appears to trigger the PreviewDrop event on the originating object.

I've tried intercepting QueryContinueDragHandler, which is fired and is having an Action set of Continue - all to no avail.

Much time with google shows no examples of people using the right mouse button with DoDragDrop, and a single query on this forum in September with someone having a similar problem.  No replies to that thread - hopeing for more luck today!

So, has anyone successfully initiated a system based Drag/Drop using the right mouse button?  In this case I'm working with a ListView, but I suspect that is fairly irrelevant.

Events occuring with Right Mouse Button depressed (and dragging a small way) are:
Call to: System.Windows.DragDrop.DoDragDrop

Callback: DropSource_ContinueDragEventHandler
Callback: DropTarget_PreviewDragEnter
Callback: DropSource_ContinueDragEventHandler
Callback: DropTarget_PreviewDrop


With the Left Mouse Button:
Call to: System.Windows.DragDrop.DoDragDrop

Callback: DropSource_ContinueDragEventHandler
Callback: DropTarget_PreviewDragEnter
Callback: DropSource_ContinueDragEventHandler
Callback: DropSource_ContinueDragEventHandler
Callback: DropSource_ContinueDragEventHandler
etc...


Anyone aware of any issues in this area?

Thanks,

Glyn

PS: The behaviour is different if dragging something from another application / desktop to a drop target, so it appears to be related to the originating side of things. ie, there is no problem when dragging an object from the desktop or similar.

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>