public CommandBinding(ICommand command, ExecutedEventHandler executed, CanExecuteEventHandler canExecute) { this.Command = command; if (executed != null) { this.Executed += new ExecutedEventHandler(executed); } if (canExecute != null) { this.CanExecute += new CanExecuteEventHandler(canExecute); } }
public DelegateCommand(ExecuteEventHandler <T> executeEventHandler, CanExecuteEventHandler <T> canExecuteEventHandler) { ExecuteEventHandler = executeEventHandler; CanExecuteEventHandler = canExecuteEventHandler; }