DoDragDrop 禁用 MouseMove 事件 [英] DoDragDrop disables MouseMove Events

查看:28
本文介绍了DoDragDrop 禁用 MouseMove 事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开始拖动 &DragDrop.DoDragDrop(...) 的拖放操作不再触发 MouseMove 事件.我什至尝试过

After having started a Drag & Drop operation by DragDrop.DoDragDrop(...) no more MouseMove Events are fired. I even tried

AddHandler(Window.MouseMoveEvent, new MouseEventHandler(myControl_MouseMove), true); 

最后一个参数意味着我什至选择处理已处理的事件.没有机会,似乎 MouseMove 事件根本没有被触发!使用 Drag & 时仍然获得 MouseMove 事件的任何方式降低?我想拖动 &放置一个控件,在拖动该控件时,它应跟随鼠标指针.知道在这种情况下如何做到这一点吗?

where the last parameter means I even opt in for handled events. No chance, seems like the MouseMove Event is never fired at all! Any way to still get MouseMove Events while using Drag & Drop? I'd like to Drag & Drop a control, while dragging this control it shall follow the mouse pointer. Any idea how to do this in this case?

推荐答案

你需要处理 DragOver 事件.

You need to handle the DragOver event.

编辑:尝试处理 GiveFeedback 事件 在您调用 DoDragDrop 的控件上;这可能会满足您的需求.

EDIT: Try handling the GiveFeedback event on the control that you called DoDragDrop on; that might do what you're looking for.

这篇关于DoDragDrop 禁用 MouseMove 事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆