I wrote a Windows 8 storage application (XAML / C #) that runs on the surface of Microsoft for me. An application is a data entry application that does not have save buttons. Saving is performed automatically when switching between pages or when the application is paused.
However, one senario that I can’t catch is when the user closes the application (when users move from top to bottom).
So, at the moment I am subscribing to App.Current.Suspending and the save call is here:
App.Current.Suspending += Current_Suspending;
void Current_Suspending(object sender, Windows.ApplicationModel.SuspendingEventArgs e)
{
Save();
}
I also override the SaveState method and call "Save here":
protected override void SaveState(Dictionary<string, object> pageState)
{
Save();
base.SaveState(pageState);
}
But none of these methods are called when the application is closed.
Does anyone know of an event that fires when the application closes?
thank