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); }
/// <returns> /// The string-form serialized navigation history. See Remarks. /// </returns> public string GetNavigationState() { var navigationState = _frame.GetNavigationState(); return(navigationState); }