protected virtual void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     if (GoBackCommand.CanExecute(null))
     {
         e.Handled = true;
         GoBackCommand.Execute(null);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Invoked when the hardware back button is pressed. For Windows Phone only.
 /// </summary>
 /// <param name="sender">Instance that triggered the event.</param>
 /// <param name="e">Event data describing the conditions that led to the event.</param>
 private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
 {
     if (GoBackCommand.CanExecute(null))
     {
         e.Handled = true;
         GoBackCommand.Execute(null);
     }
 }
 /// <summary>
 ///     Invoked when the hardware back button is pressed. For Windows Phone only.
 /// </summary>
 /// <param name="sender">Instance that triggered the event.</param>
 /// <param name="e">Event data describing the conditions that led to the event.</param>
 protected virtual void HardwareButtonsBackPressed(object sender, BackPressedEventArgs e)
 {
     if (GoBackCommand.CanExecute(null))
     {
         e.Handled = true;
         GoBackCommand.Execute(null);
     }
 }
        //private void Frame_Navigated(object sender, Windows.UI.Xaml.Navigation.NavigationEventArgs e)
        //{
        //    DeregisterPageEvents();
        //    RefreshPage();
        //    RegisterPageEvents();
        //}

        private void App_BackRequested(object sender, Windows.UI.Core.BackRequestedEventArgs e)
        {
            if (GoBackCommand.CanExecute(null))
            {
                e.Handled = true;
                GoBackCommand.Execute(null);
            }
        }//