Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
 public DelegateCommand(ExecuteEventHandler <T> executeEventHandler, CanExecuteEventHandler <T> canExecuteEventHandler)
 {
     ExecuteEventHandler    = executeEventHandler;
     CanExecuteEventHandler = canExecuteEventHandler;
 }