コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the MainWindow class.
 /// </summary>
 public MainWindow()
 {
     InitializeComponent();
     Closing += (s, e) => ViewModelLocator.Cleanup();
 }
コード例 #2
0
 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     ViewModelLocator.Cleanup();
 }