ICommand.CanExecuteChanged ICommand.CanExecuteChanged ICommand.CanExecuteChanged ICommand.CanExecuteChanged Event

定义

当出现影响是否应执行该命令的更改时发生。Occurs when changes occur that affect whether or not the command should execute.

public:
 event EventHandler ^ CanExecuteChanged;
event EventHandler CanExecuteChanged;
member this.CanExecuteChanged : EventHandler 
Event CanExecuteChanged As EventHandler 

注解

通常, 当发生此事件CanExecute时, 命令源对该命令调用。Normally, a command source calls CanExecute on the command when this event occurs.

通常, 如果命令无法执行, 命令源将禁用自身。Normally, if the command cannot execute, the command source disables itself.

适用于

另请参阅