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
  • 42271

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