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 设计器扩展性