WPF application is not closing correctly

Arsen Mkrtchyan picture Arsen Mkrtchyan · May 1, 2009 · Viewed 12.4k times · Source

I am calling Application.Current.Shutdown() from a class that is bound to xaml windows with ObjectDataProvider, but the application is not closing. Can anyone help me to understand why? My application is not closing completely after my main window is closed, it doesn't disappear from task manager's process list.

Answer

Arsen Mkrtchyan picture Arsen Mkrtchyan · May 14, 2009

Try Environment.Exit(0) instead