Share via


Command 생성자

정의

오버로드

Command(Action)

명령 클래스의 새 인스턴스를 초기화합니다.

Command(Action<Object>)

명령 클래스의 새 인스턴스를 초기화합니다.

Command(Action, Func<Boolean>)

명령 클래스의 새 인스턴스를 초기화합니다.

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

명령 클래스의 새 인스턴스를 초기화합니다.

Command(Action)

명령 클래스의 새 인스턴스를 초기화합니다.

public:
 Command(Action ^ execute);
public Command (Action execute);
new Microsoft.Maui.Controls.Command : Action -> Microsoft.Maui.Controls.Command
Public Sub New (execute As Action)

매개 변수

execute
Action

명령이 실행될 때 실행할 동작입니다.

적용 대상

Command(Action<Object>)

명령 클래스의 새 인스턴스를 초기화합니다.

public:
 Command(Action<System::Object ^> ^ execute);
public Command (Action<object> execute);
new Microsoft.Maui.Controls.Command : Action<obj> -> Microsoft.Maui.Controls.Command
Public Sub New (execute As Action(Of Object))

매개 변수

execute
Action<Object>

명령이 실행될 때 실행할 작업<개체>입니다.

설명

작업은 매개 변수를 사용하여 실행됩니다.

적용 대상

Command(Action, Func<Boolean>)

명령 클래스의 새 인스턴스를 초기화합니다.

public:
 Command(Action ^ execute, Func<bool> ^ canExecute);
public Command (Action execute, Func<bool> canExecute);
new Microsoft.Maui.Controls.Command : Action * Func<bool> -> Microsoft.Maui.Controls.Command
Public Sub New (execute As Action, canExecute As Func(Of Boolean))

매개 변수

execute
Action

명령이 실행될 때 실행할 동작입니다.

canExecute
Func<Boolean>

명령을 실행할 수 있는지 여부를 나타내는 Func<TResult>입니다.

설명

canExecute에서 반환된 값이 변경되면 를 트리거CanExecuteChanged하려면 에 대한 ChangeCanExecute() 호출이 필요합니다.

적용 대상

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

명령 클래스의 새 인스턴스를 초기화합니다.

public:
 Command(Action<System::Object ^> ^ execute, Func<System::Object ^, bool> ^ canExecute);
public Command (Action<object> execute, Func<object,bool> canExecute);
new Microsoft.Maui.Controls.Command : Action<obj> * Func<obj, bool> -> Microsoft.Maui.Controls.Command
Public Sub New (execute As Action(Of Object), canExecute As Func(Of Object, Boolean))

매개 변수

execute
Action<Object>

명령이 실행될 때 실행할 작업<개체>입니다.

canExecute
Func<Object,Boolean>

명령을 실행할 수 있는지 여부를 나타내는 Func<T,TResult>입니다.

설명

canExecute에서 반환된 값이 변경되면 를 트리거CanExecuteChanged하려면 에 대한 ChangeCanExecute() 호출이 필요합니다.

적용 대상