void RelaunchApp() { App = null; RunningApp.App = null; try { RunningApp.Restart(); } catch (Exception ex) { // if at first you dont succeed RunningApp.Restart(); } App = RunningApp.App; App.SetOrientationPortrait(); ScreenBounds = App.RootViewRect(); NavigateToGallery(); }
void RelaunchApp() { App = null; RunningApp.App = null; try { RunningApp.Restart(); } catch (Exception ex) { // if at first you dont succeed RunningApp.Restart(); } // Wrap the app in ScreenshotConditional so it only takes screenshots if the SCREENSHOTS symbol is specified App = new ScreenshotConditionalApp(RunningApp.App); App.SetOrientationPortrait(); ScreenBounds = App.RootViewRect(); NavigateToGallery(); }