Search code examples
.netwindowssystem-traysystray

Correct behaviour for tray icon click?


When an application adds an icon to the system tray and minimises to it, there must be a way to restore it. However, when it comes to restoring the window I'm not sure what the 'correct' behaviour is for applications.

Do I restore on a double click, on a single click, or not at all? What's the Windows standard?


Solution

  • Raymond Chen, in his post "Those notification icons, with their clicks, double-clicks, right-clicks... what's up with that?", writes:

    Left single click: Display a simple interface item targetting the casual user. In most cases, this would be a context menu, but if you are something like the volume control, then a custom interface item (in this case, a slider control for controlling the volume) may be more appropriate.

    Right single click: Display a context menu, but one which can contain options for more advanced users. In many cases, the menu will be identical to the left single click menu. (Important: See tomorrow's entry for additional discussion.)

    As for double-clicks, you don't need a special rule because there is already a general principle for what double-clicks mean: The double-click action, generally speaking, is equivalent to viewing the context menu and choosing the default action.