private async void OnBackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { e.Handled = true; HardwareButtons.BackPressed -= OnBackPressed; Frame.Navigate(typeof(ChooseMode)); }
private async void OnBackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { e.Handled = true; // add your own code here to run when Back is pressed HardwareButtons.BackPressed -= OnBackPressed; Frame.Navigate(typeof(MainMenu)); }
private void BackButtonPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { e.Handled = true; Windows.Phone.UI.Input.HardwareButtons.BackPressed -= BackButtonPressed; NavigationService.Instance.RegisterEvents(); IsPlaybarHidden = false; }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (Frame.CanGoBack) { e.Handled = true; Frame.GoBack(); } }
/// <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 (NavigationService.CanGoBack()) { e.Handled = true; NavigationService.GoBack(); } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { //closeApp = true; //e.Handled = true; // test //mDialog("Wollen Sie die Evaluation beenden?"); }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame != null && rootFrame.CanGoBack) { e.Handled = true; rootFrame.GoBack(); } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { DispatcherTimerOff(); //removeEffects(); disposeCamera(); Application.Current.Exit(); //closeApp = true; e.Handled = true; //mDialog("Wollen Sie die Evaluation beenden?", 0); }
private void OnBackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { var frame = Window.Current.Content as Frame; if (frame == null || !frame.CanGoBack) { return; } e.Handled = true; frame.GoBack(); }
private async void OnBackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { e.Handled = true; // add your own code here to run when Back is pressed if (SharedInformation.sharedMode == "quizz") { HardwareButtons.BackPressed -= OnBackPressed; Frame.Navigate(typeof(ChooseQuizz)); } else { HardwareButtons.BackPressed -= OnBackPressed; Frame.Navigate(typeof(AdventureMap)); } }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { var frame = Window.Current.Content as Frame; if (frame == null) { return; } if (frame.CanGoBack) { frame.GoBack(); //Indicate the back button press is handled so the app does not exit e.Handled = true; } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { lvSettingsCategory.SelectedIndex = -1; if (vsgMain.CurrentState.Name == vsMobile.Name && !gdColumn0.Width.IsStar) { gdColumn0.Width = new GridLength(1, GridUnitType.Star); gdColumn1.Width = new GridLength(0, GridUnitType.Pixel); } else { if (this.Frame.CanGoBack) { Frame.GoBack(); } } e.Handled = true; }
private async void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; e.Handled = true; if (rootFrame.CanGoBack) { rootFrame.GoBack(); } else { var msg = new MessageDialog("Are you sure to exit?"); var okBtn = new UICommand("Yes"); var cancelBtn = new UICommand("No"); msg.Commands.Add(okBtn); msg.Commands.Add(cancelBtn); IUICommand result = await msg.ShowAsync(); if (result != null && result.Label == "Yes") { Application.Current.Exit(); } } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { throw new NotImplementedException(); }
//protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e) //{ // MessageBoxResult result = MessageBox.Show("Deseja realmente sair?", "Atenção!", MessageBoxButton.OKCancel); //Exibe um MessageBox com uma mensagem e duas opções ("ok" e "Cancel") // if (result == MessageBoxResult.OK) //se o usuário tocar "OK" // { // NavigationService.Navigate(new Uri("Home.xaml", UriKind.Relative)); // base.OnBackKeyPress(e); //voltar página // } // else // { // e.Cancel = true; //Senão, cancelar ação (nada acontece) // } //} void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { e.Handled = true; Windows.Phone.UI.Input.HardwareButtons.BackPressed -= HardwareButtons_BackPressed; NavigationService.Navigate(new Uri("Home.xaml", UriKind.Relative)); }