/// <summary> /// Clears the NavigationWindow's Journal BackStack /// </summary> /// <param name="navigationWindow">NavigationWindow to Clear the BackStack on</param> internal static void ClearJournalBackStack(NavigationWindow navigationWindow) { JournalEntry entry; do { entry = navigationWindow.RemoveBackEntry(); }while (entry != null); }
private void GoToCustomizeList(object sender, RoutedEventArgs e) { NavigationWindow win = (NavigationWindow)Window.GetWindow(this); win.RemoveBackEntry(); CustomizeList CLobj = new CustomizeList(backUpHost); this.NavigationService.Navigate(CLobj); ShowsNavigationUI = true; }
public void AppStartup(object sender, StartupEventArgs e) { NavigationWindow mainWindow = new NavigationWindow { Width = 1000, Height = 800, ShowsNavigationUI = false }; mainWindow.Navigated += (s, e) => mainWindow.RemoveBackEntry(); PageController pageController = new PageController(mainWindow); mainWindow.Show(); pageController.Home(); }
private void XappLauncherApp_Navigated(object sender, NavigationEventArgs e) { EventTrace.EasyTraceEvent(EventTrace.Keyword.KeywordPerf | EventTrace.Keyword.KeywordHosting, EventTrace.Level.Verbose, EventTrace.Event.WpfHost_XappLauncherAppNavigated); if (Application.IsShuttingDown) { return; } if (!this._commandBindingsRegistered) { this._commandBindingsRegistered = true; base.MainWindow.CommandBindings.Add(new CommandBinding(NavigationCommands.BrowseStop, new ExecutedRoutedEventHandler(this.OnCommandStop))); base.MainWindow.CommandBindings.Add(new CommandBinding(NavigationCommands.Refresh, new ExecutedRoutedEventHandler(this.OnCommandRefresh))); } SecurityHelper.DemandUIWindowPermission(); NavigationWindow appWindow = base.GetAppWindow(); Invariant.Assert(appWindow != null, "A RootBrowserWindow should have been created."); while (appWindow.CanGoBack) { appWindow.RemoveBackEntry(); } }
/// <summary> /// Removes the most recent entry from the back stack. /// </summary> /// <returns> The entry that was removed. </returns> public JournalEntry RemoveBackEntry() { return(_window.RemoveBackEntry()); }