Пример #1
0
 private void BackButtonService_NavigateBack(object sender, Common.HandledEventArgs e)
 {
     if (!IsModal)
     {
         return;
     }
     if (CanBackButtonDismiss && DisableBackButtonWhenModal)
     {
         e.Handled = true;
         IsModal   = false;
     }
     else if (CanBackButtonDismiss && !DisableBackButtonWhenModal)
     {
         e.Handled = IsModal;
         IsModal   = false;
     }
     else if (!CanBackButtonDismiss && DisableBackButtonWhenModal)
     {
         e.Handled = true;
     }
     else if (!CanBackButtonDismiss && !DisableBackButtonWhenModal)
     {
         e.Handled = false;
     }
 }
Пример #2
0
        public static Common.HandledEventArgs RaiseForwardRequested()
        {
            var args = new Common.HandledEventArgs();

            ForwardRequested?.Invoke(null, args);
            return(args);
        }
Пример #3
0
        public Common.HandledEventArgs RaiseBackRequested()
        {
            var cancelEventArgs = new CancelEventArgs();

            BeforeBackRequested?.Invoke(null, cancelEventArgs);
            if (cancelEventArgs.Cancel)
            {
                return(new Common.HandledEventArgs {
                    Handled = true
                });
            }

            var handledEventArgs = new Common.HandledEventArgs();

            BackRequested?.Invoke(null, handledEventArgs);
            return(handledEventArgs);
        }
Пример #4
0
        Common.HandledEventArgs IBackButtonService2.RaiseForwardRequested()
        {
            var cancelEventArgs = new CancelEventArgs();

            BeforeForwardRequested?.Invoke(null, cancelEventArgs);
            if (cancelEventArgs.Cancel)
            {
                return(new Common.HandledEventArgs {
                    Handled = true
                });
            }

            var handledEventArgs = new Common.HandledEventArgs();

            ForwardRequested?.Invoke(null, handledEventArgs);
            return(handledEventArgs);
        }