Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void OnSystemNavigationManagerBackRequested(object sender, BackRequestedEventArgs e)
        {
            DeviceGestureEventArgs args = new DeviceGestureEventArgs();

            RaiseCancelableEvent <DeviceGestureEventArgs>(GoBackRequested, this, args);

            e.Handled = args.Handled;
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void OnHardwareButtonsBackPressed(object sender, BackPressedEventArgs e)
        {
            DeviceGestureEventArgs args = new DeviceGestureEventArgs(false, true);

            RaiseCancelableEvent <DeviceGestureEventArgs>(GoBackRequested, this, args);

            e.Handled = args.Handled;
        }
Beispiel #3
0
 /// <summary>
 /// Handling the back navigation request from the <see cref="IDeviceGestureService"/>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnGoBackRequested(object sender, DeviceGestureEventArgs e)
 {
     if (NavigationService.CanGoBack())
     {
         NavigationService.GoBack();
         e.Handled = true;
     }
     else if (DeviceGestureService.IsHardwareBackButtonPresent && e.IsHardwareButton)
     {
         Exit();
     }
 }
Beispiel #4
0
 /// <summary>
 /// Handling the forward navigation request from the <see cref="IDeviceGestureService"/>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnGoForwardRequested(object sender, DeviceGestureEventArgs e)
 {
     if (NavigationService.CanGoForward())
     {
         NavigationService.GoForward();
         e.Handled = true;
     }
 }
Beispiel #5
0
 /// <summary>
 /// Handling the back navigation request from the <see cref="IDeviceGestureService"/>
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnGoBackRequested(object sender, DeviceGestureEventArgs e)
 {
     if (NavigationService.CanGoBack())
     {
         NavigationService.GoBack();
         e.Handled = true;
     }
     else if (DeviceGestureService.IsHardwareBackButtonPresent && e.IsHardwareButton)
     {
         // Looks like default behavior must be to do nothing
         //Exit();
     }
 }
Beispiel #6
0
 private void DeviceGestureService_GoBackRequested(object sender, DeviceGestureEventArgs e)
 {
     Debug.WriteLine(nameof(this.DeviceGestureService_GoBackRequested));
     e.Handled = true;
     e.Cancel = true;
 }
Beispiel #7
0
 private void DeviceGestureService_CameraButtonPressed(object sender, DeviceGestureEventArgs e)
 {
     Debug.WriteLine(nameof(this.DeviceGestureService_CameraButtonPressed));
 }