메소드 | 설명 | |
---|---|---|
CanExecute ( object parameter ) : bool |
决定当前绑定的Command能否被执行 true:可以被执行 false:不能被执行
|
|
DelegateCommand ( Action |
构造函数,用于初始化
|
|
Execute ( object parameter ) : void |
用于执行对应的命令,只有在CanExecute可以返回true的情况下才可以被执行
|
|
RaiseCanExecuteChanged ( ) : void |
需要手动触发属性改变事件
|
public CanExecute ( object parameter ) : bool | ||
parameter | object | 不是必须的,可以依据情况来决定,或者重写一个对应的无参函数 |
리턴 | bool |
public DelegateCommand ( Action |
||
execute | Action |
|
canExecute | bool>.Func | |
리턴 | System |