双击还是单击-这些是互斥的 [英] Double Click vs Single Click - are these mutually exclusive

查看:82
本文介绍了双击还是单击-这些是互斥的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以命名应用程序实例的名称,在该实例中单击实体(例如图像)可以做一件事,但是如果双击它,它可以做一些不同的事情?

Can anyone name an instance of an application where clicking an entity (say image) does one thing, but if you double-click it it does something different?

我能够找到的唯一示例是双击iTunes中的曲目,然后将其选中(单击功能),然后播放(双击功能),这在逻辑上暗示了双击是超集(包含单击).

The only example I've been able to find is in double-clicking a track in iTunes but then that selects it (single click function) and then plays it (double-click function) which implies (logically) that double click is the superset (containing single-click).

基本上,系统要求我(在WPF中)执行一次图像单击以完成一项操作,然后双击图像执行另一项操作,但我不确定这在概念上是否正确.

Basically, I am being asked to implement (in WPF) an image single-click doing one thing and an image double-click doing another thing and I'm not sure if this is even conceptually correct.

如果某人有一个明智地做到这一点的榜样,将不胜感激?

If someone has an example of anyone sensibly doing this that would be appreciated?

推荐答案

从Windows消息传递的角度来看,双击始终会首先生成单击消息. Windows无法提前预测会再出现一次单击以将其转换为双击.我无法想象WPF会向您隐藏此物理事实.

From a Windows messaging perspective, a double-click always generates a single click message first; Windows can't predict ahead of time that another click will come in time to turn it into a double-click. I can't imagine that WPF is going to hide this physical fact from you.

这篇关于双击还是单击-这些是互斥的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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