WPF DragDrop.DoDragDrop(用于RIGHT-Click?) [英] WPF DragDrop.DoDragDrop (for a RIGHT-Click?)
问题描述
我已经启动了,但是当我调用DragDrop.DoDragDrop时,它会立即下降直到,它不等待鼠标向上。
我确实看到这个链接堆栈溢出问题,它指的是Silverlight文章,并且需要MouseCapture和它只适用于左按钮。从字面上看,似乎根本不可能在wpf中进行右键拖动操作(如windows)。我总是很难相信这样的事情:)(我没有尝试MouseCapture无效)
找到解决方案问题在 MSDN论坛。主要思想是使用 DragDrop.AddQueryContinueDragHandler 。
In WPF I want to do initiate a drag-drop using the right click. Something like windows explorer, right click, move slightly and you get the adorner to indicate a drag drop in operation. Don't move and you get the context menu when you let up the button.
I have it all initiated but when I call the "DragDrop.DoDragDrop" it immediately falls right through, it doesn't wait for the mouse up.
I did see this link Stack Overflow Question and it refers to a Silverlight article and the need for the MouseCapture AND it only works with the Left button. Taken literally, it would seem that it is simply not possible to do a right click drag operation (like windows) in wpf. I always have a tough time believing such things :) (I did try the MouseCapture to no avail)
Found solution for your problem on MSDN forums. The main idea is to use DragDrop.AddQueryContinueDragHandler.
这篇关于WPF DragDrop.DoDragDrop(用于RIGHT-Click?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!