Command<T> 类

定义

generic <typename T>
public ref class Command sealed : Microsoft::Maui::Controls::Command
public sealed class Command<T> : Microsoft.Maui.Controls.Command
type Command<'T> = class
    inherit Command
Public NotInheritable Class Command(Of T)
Inherits Command

类型参数

T
继承
Command<T>

构造函数

Command<T>(Action<T>)

初始化 Command 类的新实例。

Command<T>(Action<T>, Func<T,Boolean>)

初始化 Command 类的新实例。

方法

CanExecute(Object)

返回一个 Boolean,指示是否能使用给定的参数执行命令。

(继承自 Command)
ChangeCanExecute()

发送 CanExecuteChanged

(继承自 Command)
Execute(Object)

调用执行操作

(继承自 Command)

事件

CanExecuteChanged (继承自 Command)

适用于