public FramePageViewModel()
        {
            MainFrame = new Windows.UI.Xaml.Controls.Frame();
            string navigationState = MainFrame.GetNavigationState();

            MainFrame.Navigated += (sender, args) =>
            {
                SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility =
                    MainFrame.CanGoBack ? AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed;
            };
            MainFrame.Navigate(typeof(HomePage));
            SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;

            NavigateCommand = new DelegateCommand(NavigateCommandImpl, NavigateCommandCanExecute);
        }
Beispiel #2
0
        /// <returns>
        /// The string-form serialized navigation history. See Remarks.
        /// </returns>
        public string GetNavigationState()
        {
            var navigationState = _frame.GetNavigationState();

            return(navigationState);
        }