Exemple #1
0
        public BoundCommand(CommandExecute execute, CommandCanExecute canExecute, INotifyPropertyChanged propertyChanged = null, string propertyName = null)
        {
            this.execute = execute;
            this.canExecute = canExecute;
            if (String.IsNullOrWhiteSpace(propertyName))
                propertyChanged = null;

            if (propertyChanged != null)
            {
                propertyChanged.PropertyChanged += new PropertyChangedEventHandler(propertyChanged_PropertyChanged);
                this.propertyName = propertyName;
                this.canExecuteChangedListener = propertyChanged;
            }
        }
Exemple #2
0
        public BoundCommand(CommandExecute execute, CommandCanExecute canExecute, INotifyPropertyChanged propertyChanged = null, string propertyName = null)
        {
            this.execute    = execute;
            this.canExecute = canExecute;
            if (String.IsNullOrWhiteSpace(propertyName))
            {
                propertyChanged = null;
            }

            if (propertyChanged != null)
            {
                propertyChanged.PropertyChanged += new PropertyChangedEventHandler(propertyChanged_PropertyChanged);
                this.propertyName = propertyName;
                this.canExecuteChangedListener = propertyChanged;
            }
        }
Exemple #3
0
 public Command(CommandExecute commandExecute, CommandCanExecute commandCanExecute)
 {
     _commandExecute = commandExecute;
     _commandCanExecute = commandCanExecute;
 }
Exemple #4
0
 public DelegateCommand(Command command, CommandCanExecute canExecute)
 {
     _command    = command;
     _canExecute = canExecute;
 }
 public DelegateCommand(Command command, CommandCanExecute canExecute)
 {
     _command = command;
     _canExecute = canExecute;
 }