Exemplo n.º 1
0
        private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e)
        {
            IAsyncNavigationService service = SimpleIoc.Default.GetInstance <IAsyncNavigationService>();

            if (service != null && !e.Handled)
            {
                e.Handled = true;
                service.GoBackAsync();
            }
        }
Exemplo n.º 2
0
        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
            }
        }