rockstar rockstar - 9 months ago 136
C# Question

Minimizing Application to system tray using WPF ( Not using NotifyIcon )

I am finished making my application and now I want to incorporate " minimizing into the system tray feature " for it . I read up a good article minimize app to system tray . I realized that these make use of the Windows.Form class .

Unfortunately I have used Windows Presentation Foundation WPF reference to make my applications UI . Now I see that the NotifyIcon is not supported in WPF. I see that there is an open source library on CodePlex that simulates the NotifyIcon properties WPF Contrib I have not used it as yet .

Now I am in a fix . Here are my questions :-

a) I don't want to incorporate a 3'rd party library just for one single component .

b) Can I do the minimizing feature without NotifyIcon on WPF? If yes then how can someone give me leads please ?

Or maybe I should revert my UI back to using Windows Forms ?

Answer Source

If you'll reconsider your reluctance to using an external component, I recommend WPF NotifyIcon. I've used it. It's straightforward and works well.

It does not just rely on the corresponding WinForms component, but is a purely independent control which leverages several features of the WPF framework in order to display rich tooltips, popups, context menus, and balloon messages.