使用鼠标右键拖动() [英] Dragmove() using right mouse button

查看:118
本文介绍了使用鼠标右键拖动()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下方法

I have the following method

private void Window_MouseDown(object sender, MouseButtonEventArgs e)
       {
           if (e.ChangedButton == MouseButton.Left)
               this.DragMove();
       }





和此事件



and this event

this.MouseRightButtonDown += new MouseButtonEventHandler(Window_MouseDown);





我注意到DragMove只使用左键单击,我该怎么办?



而不是使用左键我想使用右键。



我尝试了什么:



我试过改变



I noticed that DragMove only uses Left Click, what can I do?

Instead of using the left button I would like to use the right button.

What I have tried:

I have tried changing

this.MouseRightButtonDown += new MouseButtonEventHandler(Window_MouseDown);







private void Window_MouseDown(object sender, MouseButtonEventArgs e)
       {
           if (e.ChangedButton == MouseButton.Right)
               this.DragMove();
       }

推荐答案

您好,请查看此帖子,其工作情况.......

DragMove()用鼠标右键? [ ^ ]
Hi, just check this post, its working.......
DragMove() with right mouse button?[^]


这篇关于使用鼠标右键拖动()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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