private void App_LeavingBackground(object sender, LeavingBackgroundEventArgs e)
{
// Mark the transition out of background mode.
Debug.WriteLine("Leaving background");
isInBackgroundMode = false;
// Reastore view content if it was previously unloaded.
if (Window.Current.Content == null)
{
Debug.WriteLine("Loading view");
CreateRootFrame(ApplicationExecutionState.Running, string.Empty);
}
}