コード例 #1
0
ファイル: WindowUtil.cs プロジェクト: dotnet/wpf-test
        /// <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);
        }
コード例 #2
0
        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;
        }
コード例 #3
0
ファイル: App.xaml.cs プロジェクト: fmc91/rightflight
        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();
        }
コード例 #4
0
        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();
            }
        }
コード例 #5
0
 /// <summary>
 ///     Removes the most recent entry from the back stack.
 /// </summary>
 /// <returns> The entry that was removed. </returns>
 public JournalEntry RemoveBackEntry()
 {
     return(_window.RemoveBackEntry());
 }