共用方式為


ToolCommand.ICommand.CanExecute 方法

如需這個成員的說明,請參閱 ICommand.CanExecute

命名空間:  Microsoft.Windows.Design.Interaction
組件:  Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)

語法

'宣告
Private Function CanExecute ( _
    parameter As Object _
) As Boolean Implements ICommand.CanExecute
bool ICommand.CanExecute(
    Object parameter
)
private:
virtual bool CanExecute(
    Object^ parameter
) sealed = ICommand::CanExecute
private abstract CanExecute : 
        parameter:Object -> bool 
private override CanExecute : 
        parameter:Object -> bool 
JScript 不支援明確介面實作。

參數

  • parameter
    型別:System.Object
    命令使用的資料。如果命令不需要傳遞資料,則這個物件可設為 nullNull 參照 (即 Visual Basic 中的 Nothing)。

傳回值

型別:System.Boolean
如果這個命令可執行,則為 true,否則為 false。

實作

ICommand.CanExecute(Object)

備註

這個成員是明確介面成員實作, 只有在 ToolCommand 執行個體轉換成 ICommand 介面時,才能使用這個成員。

.NET Framework 安全性

請參閱

參考

ToolCommand 類別

Microsoft.Windows.Design.Interaction 命名空間

其他資源

工具架構

了解 WPF 設計工具擴充性