Permalink
Browse files

Call CallOnUnloaded on ShutdownStarted

  • Loading branch information...
RSuter committed Feb 14, 2018
1 parent 604c36c commit 3959db18fe615e5ded82d148393e06395d0b8955
Showing with 4 additions and 1 deletion.
  1. +2 −1 .gitignore
  2. +2 −0 src/MyToolkit.Extended/Mvvm/ViewModelHelper.cs
@@ -15,4 +15,5 @@
/src/MyToolkit.Tests.WinRT/AppPackages
/src/SampleUniversalPhoneApp/AppPackages
/src/SampleWindowsStoreApp/AppPackages
/src/SampleWindowsStoreApp/BundleArtifacts
/src/SampleWindowsStoreApp/BundleArtifacts
/src/.vs/MyToolkit.VS2015/v15/Server/sqlite3
@@ -91,6 +91,8 @@ public static void RegisterViewModel(ViewModelBase viewModel, FrameworkElement v
view.Loaded += (sender, args) => viewModel.CallOnLoaded();
view.Unloaded += (sender, args) => viewModel.CallOnUnloaded();
view.Dispatcher.ShutdownStarted += delegate { viewModel.CallOnUnloaded(); };
}
#endif

0 comments on commit 3959db1

Please sign in to comment.