在WPF中区分鼠标双击和鼠标单击 [英] Distinguish between mouse doubleclick and mouse click in wpf

查看:718
本文介绍了在WPF中区分鼠标双击和鼠标单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WPF应用程序中,我使用的是ListView GridView,并且实现了与鼠标双击相关的功能. 有没有一种方法或控件可以区分鼠标双击和鼠标单击?

In my WPF application , I am using ListView GridView, and I implemented a functionality that is associated to mouse double click. Is there a way, or a control that distinguish between the mouse double click and mouse click?

我使用了一个按钮,并为mousedoubleclick实现了一个事件,但是click事件仍在触发

I used a button, and implemented an event for mousedoubleclick, but the click event is still triggering

感谢帮助

推荐答案

似乎您只是添加了MouseDoubleClick=属性.检查这些链接:

It seems you just add the MouseDoubleClick= attribute. Check these links out:

  • WPF Tutorial - Getting the DoubleClick Event
  • MouseDoubleClick MSDN Documentation
  • Detect mouse double click in WPF - Channel9

对不起,如果我误解了你的问题.

Sorry if I misunderstood your question.

这篇关于在WPF中区分鼠标双击和鼠标单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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