拖放右键单击wpf [英] Drag and drop right click wpf
本文介绍了拖放右键单击wpf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在WPF中使用右键单击进行拖放时,它会触发任何目标的下降,等待鼠标右键出现。
When I start a drag and drop using a right click in WPF it will fire the drop on any target with out waiting for the right mouse button to come up.
推荐答案
要拖动,需要捕获鼠标,这只能在鼠标左键停止时才能实现。请参阅 http:// msdn。 microsoft.com/en-us/library/system.windows.uielement.capturemouse(VS.95).aspx (对于Silverlight,但我认为是类似的)。
To drag, the mouse needs to be captured, which can only be achieved when the left mouse button is down. See http://msdn.microsoft.com/en-us/library/system.windows.uielement.capturemouse(VS.95).aspx (for Silverlight, but I think it's similar).
这篇关于拖放右键单击wpf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文