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?
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).
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?
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.
In answer to the direct question: Double Click vs Single Click - are these mutually exclusive? The answer is no, these are not mutually exclusive due to the manner in which Windows needs to interpret your behaviour with the mouse.
However, in answer to the more vague question regarding a precedent where a double click does not include the behaviour of single click [i.e. The two events exhibit mutually exclusive behaviour], there are some specific events in Windows that appear to exhibit the behaviour you're asking about.
For instance - the taskbar applets:
The taskbar clock:
You may notice however that it takes a moment to respond to your request and as others have noted that pause is Windows waiting to see if you're going to double click. If you don't double click then the Click behaviour is fired. If you do double click then the DoubleClick behaviour is fired. In these specific situations it was deemed suitable to have mutually exclusive behaviour and there may be some others.
I think it really depends on the situation as to whether the different behaviour is "right" or "wrong" - I don't think you can equivocably say that one is right and the other wrong in all situations. If the behaviour you are looking to exhibit makes good logical sense from a user perspective [not from your own programmer perspective], then sure, make the behaviour mutually exclusive; if however it doesn't make good logical sense to the user then avoid it.
It's generally a bad pattern to make a double click do something unrelated to the single click behavior. In order to distinguish between the single click and the double click, you have to wait for a moment to see if the second click arrives. That can cause a disconcerting delay when you're just single-clicking something.
Raymond Chen has a good blog post on this issue, including how to do it.
But I'd push back on the designer first.
The most obvious would seem to be Finder/Explorer, where single-clicking a file selects it and double-clicking opens it. There's plenty of precedent for this sort of thing, and people are well trained by its inclusion in the OS level to expect double click to do different things.
In Cooliris, if you click a cell in the wall, it gets selected. If you double click the image, it transitions to a full screen slide show mode, starting at that image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With