public void Initialize(Frame frame, WinUI.NavigationView navigationView, IList <KeyboardAccelerator> keyboardAccelerators) { //^^ //{[{ IdentityService.LoggedOut += OnLoggedOut; UserDataService.UserDataUpdated += OnUserDataUpdated; //}]} }
public void Initialize(Frame frame, WinUI.NavigationView navigationView, IList <KeyboardAccelerator> keyboardAccelerators) { //^^ //{[{ NavigationService.OnCurrentPageCanGoBackChanged += OnCurrentPageCanGoBackChanged; //}]} _navigationView.BackRequested += OnBackRequested; }
public void Initialize(Frame frame, WinUI.NavigationView navigationView) { //^^ //{[{ _backNavigationService.Initialize(frame); _backNavigationService.OnCurrentPageCanGoBackChanged += OnCurrentPageCanGoBackChanged; //}]} _navigationView.BackRequested += OnBackRequested; }
public void Initialize(Frame frame, WinUI.NavigationView navigationView) { _navigationView = navigationView; frame.NavigationFailed += (sender, e) => { throw e.Exception; }; frame.Navigated += Frame_Navigated; _navigationView.BackRequested += OnBackRequested; }
private void OnItemInvoked(WinUI.NavigationView sender, WinUI.NavigationViewItemInvokedEventArgs args) { //{[{ if (args.IsSettingsInvoked) { NavigationService.Navigate(typeof(wts.ItemNamePage)); return; } //}]} }
private void OnItemInvoked(WinUI.NavigationView sender, WinUI.NavigationViewItemInvokedEventArgs args) { if (args.IsSettingsInvoked) { //{--{ // Navigate to the settings page - implement as appropriate if needed //}--} //{[{ NavigationService.Navigate(typeof(wts.ItemNamePage), null, args.RecommendedNavigationTransitionInfo); //}]} } }
private void OnBackRequested(WinUI.NavigationView sender, WinUI.NavigationViewBackRequestedEventArgs args) { //{[{ if (_currentPageCanGoBack) { if (_frame.Content is FrameworkElement element && element.DataContext is IBackNavigationHandler navigationHandler) { navigationHandler.GoBack(); return; } } //}]} _navigationService.GoBack(); }
private void OnBackRequested(WinUI.NavigationView sender, WinUI.NavigationViewBackRequestedEventArgs args) { _navigationService.GoBack(); }