first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

WPF: Implementing a Notify Icon without Windows Forms; Philipp Sumi; CodeProject.com

I discovered that there’s no built-in NotifyIcon available within the WPF namespace—I had to fall back to the component of the Windows Forms namespace. So far so good, but I quickly started to miss quite a few features, including:

* Rich ToolTips rather than text
* WPF context menus and popups
* Command support and routed events 
* Flexible data binding  
* Rich balloon messages rather than the default messages provides by the OS

Just like the WinForms NotifyIcon, this control is basically a wrapper around the Shell_NotifyIcon function of the Windows API. It does, however, support the latest improvements (up to Vista), including richer ToolTips (with a fallback mechanism for Windows xp) and custom icons for balloon messages.

In case you want to start your own implementation (be it WPF or not), you can basically take the code of the Interop namespace along with the helper methods in the Util class and you should be good to go: The classes and enums there provide you with a clean and well documented façade to Shell_NotifyIcon and related classes.

[http://www.codeproject.com/KB/WPF/wpf_notifyicon.aspx]

mod date: 2009-08-19T01:57:32.000Z