private void Finish() { if (FinishCommand != null && FinishCommand.CanExecute(null)) { FinishCommand.Execute(null); } }
public void SubmitPIN(object sender, TextChangedEventArgs e) { if (FinishCommand != null && !String.IsNullOrEmpty(e.NewTextValue)) { if (FinishCommand.CanExecute(FinishCommandParameter)) { FinishCommand.Execute(FinishCommandParameter); } } }
public void SubmitWithReturn([CanBeNull] object sender, EventArgs e) { if (FinishCommand != null) { if (FinishCommand.CanExecute(FinishCommandParameter)) { FinishCommand.Execute(FinishCommandParameter); } } }
public void SubmitPIN(object sender, TextChangedEventArgs e) { if (FinishCommand != null) { if (FinishCommand.CanExecute(FinishCommandParameter)) { FinishCommand.Execute(FinishCommandParameter); } } }
private void ExecuteFinishWizard() { if (FinishCommand?.CanExecute(CanFinish) == true) { FinishCommand?.Execute(CanFinish); } var eventArgs = new RoutedEventArgs(Wizard.FinishEvent); this.RaiseEvent(eventArgs); //if (eventArgs.Cancel) // return; if (FinishButtonClosesWindow) { CloseParentWindow(true); } }
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e) { base.OnPropertyChanged(e); if ( e.Property.Name == nameof(CanSelectNextPage) || (e.Property.Name == nameof(CanHelp)) || (e.Property.Name == nameof(CanFinish)) || (e.Property.Name == nameof(CanCancel)) || (e.Property.Name == nameof(CanSelectPreviousPage)) || (e.Property.Name == nameof(CurrentPage)) ) { CancelCommand?.CanExecute(CanCancel); FinishCommand?.CanExecute(CanFinish); PreviousPageCommand?.CanExecute(CanSelectPreviousPage); NextPageCommand?.CanExecute(CanSelectNextPage); HelpCommand?.CanExecute(CanHelp); UpdateButtonState(); } }