public void Execute(object parameter) { if (first.CanExecute(parameter)) { first.Execute(parameter); } else { second.Execute(parameter); } }
internal static bool Execute(object sender, System.Windows.Input.ICommand command, object commandParameter) { if (command != null) { RoutedCommand routedCommand = command as RoutedCommand; IInputElement inputElement = sender as IInputElement; if (routedCommand != null && routedCommand.CanExecute(commandParameter, inputElement)) { routedCommand.Execute(commandParameter, inputElement); return(true); } else if (command.CanExecute(commandParameter)) { command.Execute(commandParameter); return(true); } } return(false); }
private void RaiseCommandExecute() { System.Windows.Input.ICommand command = this.Command; if (command != null) { object parameter = this.ReadLocalValue(RadRating.CommandParameterProperty); if (parameter == DependencyProperty.UnsetValue) { parameter = this.Value; } else { parameter = this.GetValue(RadRating.CommandParameterProperty); } if (command.CanExecute(parameter)) { command.Execute(parameter); } } }
public bool CanExecute(object parameter) { return(first.CanExecute(parameter) || second.CanExecute(parameter)); }
public bool CanExecute(object parameter) { return(baseCommand.CanExecute(parameter)); }