public void AddWatchedCollection(INotifyPropertyChanged owner, string propertyName, INotifyCollectionChanged collection) { if (PropertyWatcher == null) { PropertyWatcher = new PropertyChangedWatcher(); PropertyWatcher.PropertyChangedCallback += this.WatchedPropertyChangedEventHandler; } PropertyWatcher.AddWatchedCollection(owner, propertyName, collection); }
public void AddWatchedProperty(INotifyPropertyChanged owner, string propertyName) { if (PropertyWatcher == null) { PropertyWatcher = new PropertyChangedWatcher(); PropertyWatcher.PropertyChangedCallback += this.WatchedPropertyChangedEventHandler; } PropertyWatcher.AddWatchedProperty(owner, propertyName); }
public ReactiveCommand(CommandExecuteDelegate execute = null, CanExecuteDelegate canExecute = null, PropertyChangedWatcher propertyWatcher = null) { ReasonsDisabled = new ObservableCollection <string>(); CanExecuteMethod = canExecute; ExecuteMethod = execute; PropertyWatcher = propertyWatcher; if (PropertyWatcher != null) { PropertyWatcher.PropertyChangedCallback += this.WatchedPropertyChangedEventHandler; } }
public ReactiveCommand(Action execute = null, CanExecuteDelegate canExecute = null, PropertyChangedWatcher propertyWatcher = null) : this(delegate(object param) { if (execute != null) { execute(); } }, canExecute, propertyWatcher) { }