开发者

How to capture cancelling of dragging?

开发者 https://www.devze.com 2023-02-14 05:24 出处:网络
I have a drag-and-drop functionality in my application using DragDrop event and DoDragDrop method to start dragging. The question is: how can I capture cancelling dragging when Esc is pressed during t

I have a drag-and-drop functionality in my application using DragDrop event and DoDragDrop method to start dragging. The question is: how can I capture cancelling dragging when Esc is pressed during the p开发者_JAVA百科rocess of dragging?


That's what the QueryContinueDrag event is designed to do. It is raised on the drag source when the user presses the Escape key, the e.EscapePressed property will be true. Set e.Action = DragAction.Cancel to cancel the D+D.

0

精彩评论

暂无评论...
验证码 换一张
取 消