private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e) { IAsyncNavigationService service = SimpleIoc.Default.GetInstance <IAsyncNavigationService>(); if (service != null && !e.Handled) { e.Handled = true; service.GoBackAsync(); } }
private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e) { if (AppFrame == null) { return; } IAsyncNavigationService service = SimpleIoc.Default.GetInstance <IAsyncNavigationService>(); if (service != null && AppFrame.CanGoBack && !e.Handled) // The base CanGoBack is synchronous and not reliable here { e.Handled = true; service.GoBackAsync(); // Use the navigation service to make sure the navigation is possible } }