private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { /* * System.Windows.Controls.Frame rootFrame = this.Content as Frame; * if (rootFrame != null && rootFrame.CanGoBack && MainWebView.CanGoBack) * { * e.Handled = true; * MainWebView.GoBack(); * } */ return; }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (DrawerLayout.IsDrawerOpen) { DrawerLayout.CloseDrawer(); e.Handled = true; } else { Application.Current.Exit(); } }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (IsOpen) { CloseDialog(); } else { ConfirmAndExit(); } e.Handled = true; }
public void OnBackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame != null) { if (rootFrame.CanGoBack) { e.Handled = true; rootFrame.GoBack(); } } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame != null) { if (rootFrame.CanGoBack) { rootFrame.GoBack(); e.Handled = true; } } }
private static void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (CanNavigateBack) { NavigateBack(); e.Handled = true; } else { bool allowExit = (_currentPage as IManageable).AllowAppExit(); e.Handled = !allowExit; } }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (ScenarioFrame.CanGoBack) { // Clear the status block when navigating NotifyUser(String.Empty, NotifyType.StatusMessage); ScenarioFrame.GoBack(); //Indicate the back button press is handled so the app does not exit e.Handled = true; } }
/// <summary> /// Manage backButton pressed: close appsettings panel if open, and exit app if on main page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (this.SettingsPopup.IsOpen) { this.SettingsPopup.IsOpen = false; e.Handled = true; } else { StopSensors(); Application.Current.Exit(); } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (!e.Handled && Frame.CanGoBack) { Frame.GoBack(); //Indicate the back button press is handled so the app does not exit e.Handled = true; } else { App.Current.Exit(); } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { e.Handled = true; if (picDetail.Visibility == Visibility.Visible) { picDetail.Visibility = Visibility.Collapsed; picList.Visibility = Visibility.Visible; } else { MainPage._CurrentHandle.GoBack(true); } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame frame = Window.Current.Content as Frame; if (frame == null) { return; } if (frame.CanGoBack) { frame.Navigate(typeof(MainPage), ""); e.Handled = true; } }
private async void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { await _bandClient.SensorManager.Pedometer.StopReadingsAsync(); _bandClient.SensorManager.Pedometer.ReadingChanged -= PedometerOnReadingChanged; Frame rootFrame = Window.Current.Content as Frame; if (rootFrame != null && rootFrame.CanGoBack) { e.Handled = true; rootFrame.GoBack(); } gg.Value = 0; }
private async void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame != null && rootFrame.CanGoBack) { // Do something with the back button here var dlg = new Windows.UI.Popups.MessageDialog("You tapped the Back button!!!."); await dlg.ShowAsync(); rootFrame.GoBack(); e.Handled = true; } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (SearchBox.Visibility == Visibility.Visible) { SearchBox.Visibility = Visibility.Collapsed; SearchBox.Text = ""; ((ItemsShowcaseViewModel)DataContext).ClearSearch.Execute(null); e.Handled = true; } else { Application.Current.Exit(); } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame != null && rootFrame.CanGoBack && rootFrame.CurrentSourcePageType != typeof(Tickets.MainPage)) { e.Handled = true; rootFrame.GoBack(); } else { e.Handled = false; } }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { var rootFrame = Window.Current.Content as Frame; if (rootFrame == null) { return; } if (!rootFrame.CanGoBack) { return; } rootFrame.GoBack(); e.Handled = true; }
/// <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) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame.SourcePageType != typeof(CommanderPage) && this.GoBackCommand.CanExecute(null)) { e.Handled = true; this.GoBackCommand.Execute(null); } else { Application.Current.Exit(); } }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame != null && rootFrame.CanGoBack) { rootFrame.GoBack(); e.Handled = true; } //var frame = new Frame(); //frame.Navigate(typeof(PubnubDemoStart)); //Window.Current.Content = frame; //e.Handled = true; }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { try { new HostName(TB_IP.Text); } catch { return; } var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; localSettings.Values["IP"] = TB_IP.Text; }
private void BackButtonPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { e.Handled = true; if (NowPlayingFrame.BackStackDepth <= 1) { NowPlayingFrame.BackStack.Clear(); Windows.Phone.UI.Input.HardwareButtons.BackPressed -= BackButtonPressed; NavigationService.Instance.RegisterEvents(); _shellVm.IsPlaybarHidden = false; } else { NowPlayingFrame.GoBack(new Windows.UI.Xaml.Media.Animation.SlideNavigationTransitionInfo()); } }
private void FeedbackOverlay_BackKeyPress(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) #endif { // If back is pressed whilst notification is open, close // the notification and cancel back to stop app from exiting. if (Visibility == Visibility.Visible) { OnNoClick(); #if SILVERLIGHT e.Cancel = true; #else e.Handled = true; #endif } }
public void OnBackKeyPress(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (HasPopup) { e.Handled = true; return; } if (IsOpen) { e.Handled = true; BackButtonPressed = true; Hide(); } }
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { Frame 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; } }
/// <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) { Frame rootFrame = Window.Current.Content as Frame; if (this.Page is HomePage) { } else { if (rootFrame != null && rootFrame.CanGoBack) { e.Handled = true; rootFrame.GoBack(); } } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { int BackStackDepth = Frame_Main.BackStackDepth; if (BackStackDepth == 1) { //어플종료코드 넣어야함 Frame_Main.GoBack(); e.Handled = true; } else if (Frame_Main.CanGoBack) { Frame_Main.GoBack(); e.Handled = true; } }
private void HardwareButtonBackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (ArticleContorl.BackBtnVisibility == Visibility.Visible) { e.Handled = true; if (ArticleContorl.CommentOpened) { ArticleContorl.CloseCommentPanel(); } else { BackButtonClick(null, null); ArticleContorl.BackBtnVisibility = Visibility.Collapsed; } } }
/// <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 (this.GoBackCommand.CanExecute(null)) { e.Handled = true; if (BlockBackStateTemporarily != null) { BlockBackStateTemporarily(); BlockBackStateTemporarily = null; } else { this.GoBackCommand.Execute(null); } } }
private static async void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (CanNavigateBack) { NavigateBack(); e.Handled = true; } else { if (_currentPage as IAppReturnControllable != null) { bool allowExit = await(_currentPage as IAppReturnControllable).AllowAppExit(); e.Handled = !allowExit; } } }
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { e.Handled = true; Frame frame = Window.Current.Content as Frame; if (frame == null) { return; } if (frame.CanGoBack) { frame.GoBack(); } }
private void Hardwarebuttons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (this.Frame == null) { return; } if (this.Frame.CanGoBack) { this.Frame.GoBack(); e.Handled = true; } else { this.Frame.Navigate(typeof(MainPage), ""); e.Handled = true; } }