ICommand.CanExecuteChanged 事件

定義

發生於影響命令是否應執行的變更發生時。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 

備註

一般來說,當此事件發生時,命令來源會在命令上呼叫 CanExecuteNormally, a command source calls CanExecute on the command when this event occurs.

一般來說,如果命令無法執行,命令來源就會自行停用。Normally, if the command cannot execute, the command source disables itself.

適用於

另請參閱