How do I exit a WPF application programmatically?
How is one supposed to exit an application such as when the user clicks on the Exit menu item from the File menu? I have tried: this.Dispose(); this.Exit(); Application.ShutDown(); Application.Exit(); Application.Dispose(); Among many others. Nothing works. 18 s 18 To exit your application you can call System.Windows.Application.Current.Shutdown(); As described in the documentation to the Application.Shutdown … Read more