OdeToCode IC Logo

Mice, Usability, and Silverlight

Wednesday, September 26, 2007

There is no mouse double-click event on UIElements in Silverlight.

Some people think this is an odd omission. Silverlight's cousin WPF can fire a double-click event, so why not Silverlight? Even JavaScript can catch double-click events inside a web page (although in true web fashion, the exact behavior depends on the combination of browser version, operating system, and the current phase of the moon – see Jan Wolter's Javascript Madness: Mouse Events for all the gory details).

You can still detect a double click using a mouse up event handler and a timestamp - but should you? The omission of a double-click event wasn't because of a technical limitation – the omission is a deliberate design decision. Silverlight is built for the web, and many consider double-clicking on the web to be a usability no-no.

Here is what Peter Chng has to say:

Take this comment by about the new Yahoo! Photos site; the user laments about the interface requiring a double-click to open a full-size image rather than just a traditional single-click as on most other websites. (The double-click detection is done via JavaScript)

I'll admit that while I was first confused by this action, I thought little of that user's comment - I mean, how hard can it be to learn a simple action like that? But, after some more thinking, I've come to agree with the comment - breaking the pattern of how a user navigates on a website is not a good idea, even if it's done to try to make your website feel more like a desktop application.

The New York Times website includes a feature that launches a search (in a pop-up window) when you double click a word inside an article. Digital Inspiration believes this behavior is user unfriendly, while Dion thinks the feature is a bug.

You might also have noticed the only mouse button events in Silverlight are LEFT mouse buttons events. Edit (I haven't kept up with changes in the other lifestyle...) Macs don't have a right mouse button, and my guess is they never will (adding one now would be like admitting defeat). Exposing a right-click event could only invite more usability problems.

Silverlight has some wonderful potential. Just remember to innovate – don't aggravate.

Scott Bellware Wednesday, September 26, 2007
My Mac mouse has a right mouse button and the OS responds to it.


The trackpad on my MacBook also has a right click.

scott Wednesday, September 26, 2007
Wow. I had no idea.

The MacBooks always tempted me, but the different keyboard and mouse bothered me.

But now ...
Matt Casto Wednesday, September 26, 2007
My parents and countless other people I know double click on EVERYTHING! They double click on the start menu to launch programs, on links in their web browser, on the send button in Outlook, etc. etc. and nothing I say seems to make a difference.

Not understanding where to click and double click is beyond user error, it's a usability problem. New users to windows click once on something, nothing happens, they're told to double click, okay that works, double click on everything. See how it can happen?

I had never thought of just not allowing double click, but now I think it's a great idea. You'll still have people double clicking, but they'll be blissfully unaware of their mistake.

Also, I totally understand no right clicks - the right click brings up the context menu that can take you to the "Silverlight Configuration" dialog. I'm not sure if Flash has a right click event, but I'd doubt it since a right click brings up the flash context menu.
Comments are closed.