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(); } }
private void BackHandler(object sender, ExecutedRoutedEventArgs args) { 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(); } }
public void ActiveStepChanged(object sender, ActiveStepChangedEventArgs e) { Stepper stepper = (Stepper)sender; _stepperController = stepper.Controller; int activeStepIndex = stepper.Steps.IndexOf(e.Step); if (Items.Count > activeStepIndex) { ActiveItem = Items[activeStepIndex]; } else { _stepperController.Back(); } }