Resource

How to Close a WPF application programmatically?

XAML Designer Resources Oct 25, 2009
Shutdown method of Application class in WPF is used to stop an application immediately regardless if Close event is fired or not.
  • 0
  • 0
  • 42827

Shutdown method of Application class in WPF is used to stop an application immediately regardless if Close event is fired or not. Shutdown method is called implicitly on Window close and MainWindow close events when Shutdown mode is set to OnLastWindowClose, OnMainWindowClose respectively.

Application curApp = Application.Current;
curApp.Shutdown();

 

COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

TOP RESOURCES

MOST LIKED RESOURCES