This project has moved and is read-only. For the latest updates, please go here.

Application.Current.Shutdown() not working from NotifyIcon

Feb 21, 2011 at 10:03 PM

I'm using the NotifyIcon, and calling Application.Current.Shutdown() from an "Exit" MenuItem in the NotifyIcon's ContextMenu. This closes the window and icon, but the app continues to run (VS, for example, does not leave debug mode). The exact same code works when run from a different control, e.g. a button.

Any suggestions? Cheers.

Feb 24, 2011 at 7:40 AM

Sorry, but I'm unable to reproduce this behavior.

When an app doesn't shutdown it usually means a thread (besides the main one) is still working.

Apr 24, 2012 at 7:07 AM


I've just run into the same problem. Here is solution that worked for me:

( and

ThreadStart ts = delegate()
Thread t = new Thread(ts);