コード例 #1
0
        //PropertyChangedBase _parent;

        public ButtonCommand(PropertyChangedBase parent, Action ExeAction, Func <bool> CanExecuteCondition)
        {
            _action                 = ExeAction;
            _condition              = CanExecuteCondition;
            parent.PropertyChanged += delegate { CanExecuteChanged?.Invoke(this, EventArgs.Empty); };
        }
コード例 #2
0
ファイル: CommandAsync.cs プロジェクト: bediak/Src
 public AsyncCommand(PropertyChangedBase parent, Func <Task> command, Func <bool> CanExecuteCondition)
 {
     _command                = command;
     _condition              = CanExecuteCondition;
     parent.PropertyChanged += delegate { CanExecuteChanged?.Invoke(this, EventArgs.Empty); };
 }