Exemplo n.º 1
0
        private void BackHandler(object sender, ExecutedRoutedEventArgs args)
        {
            bool isValid = ValidateActiveStep();

            if (BlockNavigationOnValidationErrors && !isValid)
            {
                RaiseNavigationCanceledByValidation();

                return;
            }

            StepperNavigationEventArgs navigationArgs = new StepperNavigationEventArgs(BackNavigationEvent, this, m_controller.ActiveStep, m_controller.PreviousStep, false);

            RaiseEvent(navigationArgs);

            if (BackNavigationCommand != null && BackNavigationCommand.CanExecute(navigationArgs))
            {
                BackNavigationCommand.Execute(navigationArgs);
            }

            if (!navigationArgs.Cancel)
            {
                m_controller.Back();
            }
        }
Exemplo n.º 2
0
        private void BackHandler(object sender, ExecutedRoutedEventArgs args)
        {
            StepperNavigationEventArgs navigationArgs = new StepperNavigationEventArgs(BackNavigationEvent, this, Controller.ActiveStep, Controller.PreviousStep, false);

            RaiseEvent(navigationArgs);

            if (BackNavigationCommand != null && BackNavigationCommand.CanExecute(navigationArgs))
            {
                BackNavigationCommand.Execute(navigationArgs);
            }

            if (!navigationArgs.Cancel)
            {
                Controller.Back();
            }
        }