//PropertyChangedBase _parent; public ButtonCommand(PropertyChangedBase parent, Action ExeAction, Func <bool> CanExecuteCondition) { _action = ExeAction; _condition = CanExecuteCondition; parent.PropertyChanged += delegate { CanExecuteChanged?.Invoke(this, EventArgs.Empty); }; }
public AsyncCommand(PropertyChangedBase parent, Func <Task> command, Func <bool> CanExecuteCondition) { _command = command; _condition = CanExecuteCondition; parent.PropertyChanged += delegate { CanExecuteChanged?.Invoke(this, EventArgs.Empty); }; }