Search code examples
wpfshutdownapplication-shutdown

WPF application is not closing correctly


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.


Solution

  • Have you created any threads to do background processing? If you have, make sure to set the .IsBackground property on them, or they can keep the app running