Пример #1
0
 private void MainPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (InnerFrame.CanGoBack)
     {
         InnerFrame.GoBack();
     }
 }
 private void AddGalery_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (e.Handled == false) {
         e.Handled = true;
         rootFrame.GoBack();
     }
 }
 private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (!e.Handled)
     {
         e.Handled = TryGoBack();
     }
 }
Пример #4
0
        private void OnBackRequested(object sender, BackRequestedEventArgs backRequestedEventArgs)
        {
            if (Frame.CanGoBack)
                Frame.GoBack();

            backRequestedEventArgs.Handled = true;
        }
Пример #5
0
        public void OnBackRequested(object sender, BackRequestedEventArgs e)
        {
            Debug.WriteLine("On Back request");
            var navigableViewModel = this.DataContext as INavigable;
            if (navigableViewModel != null)
            {
                if (navigableViewModel.AllowGoBack())
                {
                    if (this.Frame.CanGoBack)
                    {
                        this.Frame.GoBack();
                        //Prevent out app
                        if (e != null)
                            e.Handled = true;
                    }
                }
                else
                {
                    if (e != null)
                        //Prevent out app
                        e.Handled = true;
                }

            }
            else
            {
                if (App.Current.NavigationService.CanGoBack())
                {
                    App.Current.NavigationService.GoBack();
                    //Prevent out app
                    if (e != null)
                        e.Handled = true;
                }
            }
        }
 private void OnBackRequested(object sender, BackRequestedEventArgs e) {
     // Mark event as handled so we don't get bounced out of the app.
     e.Handled = true;
     // Page above us will be our master view.
     // Make sure we are using the "drill out" animation in this transition.
     Frame.Navigate(typeof(SearchResult), "Back", new EntranceNavigationTransitionInfo());
 }
 // What happens when back button is pressed
 private void OnBackRequested(object sender, BackRequestedEventArgs backRequestedEventArgs)
 {
     if (Frame.CanGoBack)
         Frame.GoBack();
     // mark the event as handled so that UI will not handle
     backRequestedEventArgs.Handled = true;
 }
Пример #8
0
        private void Go_Back(object sender, BackRequestedEventArgs e)
        {
            systemNavigationManager.BackRequested -= Go_Back;

            if (!isNarrow || (isNarrow && !isEditting)) {
                System.Diagnostics.Debug.WriteLine("Going back to Main");

                Frame rootFrame = Window.Current.Content as Frame;
                if (rootFrame == null)
                    return;

                // Navigate back if possible, and if the event has not 
                // already been handled .
                if (rootFrame.CanGoBack && e.Handled == false)
                {
                    e.Handled = true;
                    rootFrame.GoBack();
                }
            }
            else {
                System.Diagnostics.Debug.WriteLine("Going back to Master");

                e.Handled = true;
                isEditting = false;
                adjustColumns();
                systemNavigationManager.BackRequested += Go_Back;

            }

        }
Пример #9
0
 private void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     if ( lastpage == typeof(MainPage))
         this.Frame.Navigate(typeof(MainPage));
     else if (lastpage == typeof(Pages.Page_Livros))
         this.Frame.Navigate(typeof(Pages.Page_Livros));
 }
Пример #10
0
 /// <summary>
 /// 系统后退
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private async void MainPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (!sptViewNavigation.IsSwipeablePaneOpen)
     {
         if (this.frmPages.CanGoBack && !this.frmPages.Content.GetType().Equals(typeof(HomePage)))  //
         {
             this.frmPages.GoBack();
         }
         else
         {
             if (popTips.IsOpen)  //第二次按back键
             {
                 Application.Current.Exit();
             }
             else
             {
                 popTips.IsOpen = true;  //提示再按一次
                 popTips.HorizontalOffset = this.ActualWidth / 2 - 45;  //居中
                 popTips.VerticalOffset = this.ActualHeight / 2 - 5;
                 e.Handled = true;
                 await Task.Delay(1000);  //1000ms后关闭提示
                 popTips.IsOpen = false;
             }
         }
     }
     else
     {
         sptViewNavigation.IsSwipeablePaneOpen = false;
     }
     e.Handled = true;
 }
        private void App_BackRequested(object sender, BackRequestedEventArgs e)
        {
            if (!e.Handled)
            {
                if (CommunityItemPhotoGrid.Visibility == Visibility.Visible)
                {
                    CommunityItemPhotoGrid.Visibility = Visibility.Collapsed;
                    //SystemNavigationManager.GetForCurrentView().BackRequested -= App_BackRequested;
                    //SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
                }
                else if (ContentFrame.Visibility == Visibility.Visible)
                {
                    if (!App.isPerInfoContentImgShow)
                    {   //SystemNavigationManager.GetForCurrentView().BackRequested -= App_BackRequested;
                        //SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
                        ContentFrame.Visibility = Visibility.Collapsed;
                        //CommunityMyAppBarButton.Visibility = Visibility.Visible;
                    }
                }
                else
                {

                    if (Frame.CanGoBack)
                    {
                        Frame.GoBack();
                    }
                    SystemNavigationManager.GetForCurrentView().BackRequested -= App_BackRequested;
                    SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
                }
            }
            e.Handled = true;
        }
 private void backButton(object sender, BackRequestedEventArgs e)
 {  
     if (Frame.CanGoBack) {
         e.Handled = true;
         Frame.GoBack();
     }  
 }
        private void CustomConnectedAnimationDetail_BackRequested(object sender, BackRequestedEventArgs e)
        {
            if (!e.Handled)
            {
                // Unregister the handler
                SystemNavigationManager.GetForCurrentView().BackRequested -= CustomConnectedAnimationDetail_BackRequested;

                // We are about to transition to a new page.  Cancel any outstanding transitions.
                if (_currentTransition != null)
                {
                    if (!_currentTransition.Completed)
                    {
                        _currentTransition.Cancel();
                    }
                    _currentTransition = null;
                }

                // Setup the new transition and trigger the navigation
                ConnectedTransition transition = new ConnectedTransition();
                transition.Initialize(_host, ThumbnailImage, _detailsInfo);

                _host.Navigate(typeof(CustomConnectedAnimation), transition);

                // We've got it handled
                e.Handled = true;
            }
        }
Пример #14
0
 private void SystemNavigationManagerBackRequested(object sender, BackRequestedEventArgs e)
 {
     if (Frame.CanGoBack)
     {
         e.Handled = true;
         Frame.GoBack();
     }
 }
 private void EditFundacion_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (e.Handled == false)
     {
         e.Handled = true;
         rootFrame.GoBack();
     }
 }
 private void AgregarSemanaPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (e.Handled == false)
     {
         e.Handled = true;
         rootFrame.GoBack();
     }
 }
Пример #17
0
 private void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     if (NavFrame != null && NavFrame.CanGoBack)
     {
         e.Handled = true;
         NavFrame.GoBack();
     }
 }
Пример #18
0
        private void backButton_Tapped(object sender, BackRequestedEventArgs e) {
            //issue with the hardware back button and go back function
            if (Frame.CanGoBack) {
                Frame.GoBack();
                e.Handled = true;
            }

        }
Пример #19
0
 private void CurrentView_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (this.Frame.CanGoBack)
     {
         e.Handled = true;
         this.Frame.GoBack();
     }
 }
Пример #20
0
 // handle software back button press
 void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     var shell = (Shell)Window.Current.Content;
     if (shell.RootFrame.CanGoBack) {
         e.Handled = true;
         shell.RootFrame.GoBack();
     }
 }
Пример #21
0
 private void MainPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (this.Frame.CanGoBack)
     {
         this.Frame.GoBack();
         e.Handled = true;
     }
 }
        private void OnBackRequested(object sender, BackRequestedEventArgs e)
        {
            if (!CanGoBack)
                return;

            e.Handled = true;
            GoBack();
        }
 private void ListaTrabajadorPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (e.Handled == false)
     {
         e.Handled = true;
         rootFrame.GoBack();
     }
 }
Пример #24
0
 private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e)
 {
     profileViewModel.PropertyChanged += ViewModel_PropertyChanged;
     if (!e.Handled)
     {
         e.Handled = TryGoBack();
     }
 }
Пример #25
0
 public static void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     if (Pages.Shell.ContentFrame != null && Pages.Shell.ContentFrame.CanGoBack && !e.Handled)
     {
         e.Handled = true;
         Pages.Shell.ContentFrame.GoBack();
     }
 }
 private void IceCreamPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (e.Handled == false)
     {
         e.Handled = true;
         rootFrame.GoBack();
     }
 }
Пример #27
0
 private void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     var frame = (Frame)Window.Current.Content;
     if (frame.CanGoBack) {
         frame.GoBack();
         e.Handled = true;
     }
 }
 /// <summary>
 /// This method facilitates navigation when the back button is pressed.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Navigation_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (!e.Handled & this.Frame.CanGoBack)
     {
         e.Handled = true;
         this.Frame.GoBack();
     }
 }
 private void App_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (e.Handled == false && Frame.CanGoBack)
     {
         e.Handled = true;
         Frame.GoBack();
     }
 }
 protected virtual void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     if (base.Frame.CanGoBack)
     {
         e.Handled = true;
         base.Frame.GoBack();
     }
 }
 private void WhatsNewContentPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     FrameNavigationService.GoBack();
     e.Handled = true;
 }
Пример #32
0
 private void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     Frame.Navigate(typeof(MainMenuPage));
     e.Handled = true;
 }
Пример #33
0
 private void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     e.Handled = TryGoBack();
 }
Пример #34
0
        /// <summary>
        /// 按下后退按钮(设备硬件按钮或是UWP标题栏上的软件按钮)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnBackRequested(object sender, BackRequestedEventArgs e)
        {
            INavigationService navigationService = ServiceLocator.Current.GetInstance <INavigationService>();

            navigationService.GoBack();
        }
Пример #35
0
 private void SearchViewPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     FrameNavigationService.GoBack();
 }
Пример #36
0
 private void OnBackRequested(object sender, BackRequestedEventArgs args) => this.GoBack();
Пример #37
0
 private void FeedbackPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     e.Handled = true;
     OnBackRequested();
 }
Пример #38
0
 private void App_BackRequested(object sender, BackRequestedEventArgs e)
 {
     e.Handled = NavigationService.GoBack();
 }
Пример #39
0
 void HardwareButtonsOnBackPressed(object sender, BackRequestedEventArgs e)
 {
     SongList.SelectionMode = ListViewSelectionMode.None;
 }
Пример #40
0
 private void BingWallpaperDetailsPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     Frame.Navigate(typeof(MainPage));
 }
 private void StatsView_BackRequested(object sender, BackRequestedEventArgs e)
 {
     e.Handled = true;
     Frame.GoBack(new SuppressNavigationTransitionInfo());
 }
Пример #42
0
 private void OnBackRequested(object sender, BackRequestedEventArgs args)
 {
     _output.Text += "Back requested\r\n";
     args.Handled  = _handle.IsChecked.GetValueOrDefault();
 }
 private void DownloadsTab_BackRequested(object sender, BackRequestedEventArgs e)
 {
     this.Frame.Navigate(typeof(MainPage));
 }
Пример #44
0
 private void ShellPage_BackRequested(object sender, BackRequestedEventArgs e)
 => _frame.GoBack();
Пример #45
0
 private void BackRequested(object sender, BackRequestedEventArgs e)
 {
     e.Handled = true;
     back();
 }
Пример #46
0
        private void ActivationService_BackRequested(object sender, BackRequestedEventArgs e)
        {
            var result = NavigationService.GoBack();

            e.Handled = result;
        }
Пример #47
0
        private void App_BackRequested(object sender, BackRequestedEventArgs e)
        {
            Frame rootFrame = Window.Current.Content as Frame;

            rootFrame.Navigate(typeof(MainPage), null);
        }
Пример #48
0
 private void App_BackRequested(object sender, BackRequestedEventArgs e)
 {
     GoBack();
 }
 private void OnHardwareBackRequested(object sender, BackRequestedEventArgs e)
 {
     // Mark event as handled so we don't get bounced out of the app.
     e.Handled = true;
     OnBackRequested();
 }
Пример #50
0
 protected virtual void OnBackKeyPressing(BackRequestedEventArgs args)
 {
     BackKeyPressing?.Invoke(this, args);
 }
Пример #51
0
 private void OnBackRequested(object sender, BackRequestedEventArgs backRequestedEventArgs)
 {
     backRequestedEventArgs.Handled = true;
     HideDiscardStoryboard.Begin();
 }
Пример #52
0
 private void TestView_BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (ContentFrame.CanGoBack)
     {
         e.Handled = true;
         ContentFrame.GoBack();
         if (ContentFrame.Content.ToString() == "App2.MainDiary")
         {
             radioButton1.IsChecked  = true;
             radioButton1.Background = new SolidColorBrush(Colors.Red);
             radioButton2.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.MapPage")
         {
             radioButton3.IsChecked  = true;
             radioButton3.Background = new SolidColorBrush(Colors.Red);
             radioButton2.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.RoutePage")
         {
             radioButton4.IsChecked  = true;
             radioButton4.Background = new SolidColorBrush(Colors.Red);
             radioButton2.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.InvertoryMain")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.FieldInvertoryItem")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.CreateInvert")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.FieldInvert")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
         if (ContentFrame.Content.ToString() == "App2.OpenInvertory")
         {
             radioButton2.IsChecked  = true;
             radioButton2.Background = new SolidColorBrush(Colors.Red);
             radioButton4.Background = new SolidColorBrush(Colors.Transparent);
             radioButton1.Background = new SolidColorBrush(Colors.Transparent);
             radioButton3.Background = new SolidColorBrush(Colors.Transparent);
         }
     }
 }
Пример #53
0
 private void PageHelper_BackRequested(object sender, BackRequestedEventArgs e)
 {
     this.Back();
 }
Пример #54
0
 private void ShowCasePage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     FrameNavigationService.GoBack();
     e.Handled = true;
 }
Пример #55
0
 private void GestureService_BackRequested(object sender, BackRequestedEventArgs e)
 {
     RaiseBackRequested();
 }
 private void Page6AppCalendar_BackRequested(object sender, BackRequestedEventArgs e)
 {
     Frame.GoBack();
     e.Handled = true;
 }
Пример #57
0
 private void MainPage_BackRequested(object sender, BackRequestedEventArgs e)
 {
     // On interdit la sortie de l'application par ce bouton
     e.Handled = true;
 }
Пример #58
0
        private void Nav_BackRequested(object sender, BackRequestedEventArgs e)
        {
            var ignored = _navigationService.GoBackAsync();

            e.Handled = true;
        }
 private void backButton_Tapped(object sender, BackRequestedEventArgs e)
 {
     this.GoBack(this, new RoutedEventArgs());
 }
Пример #60
0
 private static void HardwareButtonsOnBackPressedForSearchCollection(object sender, BackRequestedEventArgs e)
 {
     UiBlockerUtility.Unblock();
     App.SupressBackEvent -= HardwareButtonsOnBackPressedForSearchCollection;
     CloseSearchCollectionPage();
 }