Udostępnij za pośrednictwem


Command Konstruktory

Definicja

Przeciążenia

Command(Action)

Inicjuje nowe wystąpienie klasy Command.

Command(Action<Object>)

Inicjuje nowe wystąpienie klasy Command.

Command(Action, Func<Boolean>)

Inicjuje nowe wystąpienie klasy Command.

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

Inicjuje nowe wystąpienie klasy Command.

Command(Action)

Źródło:
Command.cs
Źródło:
Command.cs

Inicjuje nowe wystąpienie klasy Command.

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

Parametry

execute
Action

Akcja do wykonania po wykonaniu polecenia.

Dotyczy

Command(Action<Object>)

Źródło:
Command.cs
Źródło:
Command.cs

Inicjuje nowe wystąpienie klasy Command.

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))

Parametry

execute
Action<Object>

Obiekt> akcji<do wykonania po wykonaniu polecenia.

Uwagi

Akcja zostanie wykonana z parametrem.

Dotyczy

Command(Action, Func<Boolean>)

Źródło:
Command.cs
Źródło:
Command.cs

Inicjuje nowe wystąpienie klasy Command.

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))

Parametry

execute
Action

Akcja do wykonania po wykonaniu polecenia.

canExecute
Func<Boolean>

Wartość wskazująca Func<TResult> , czy polecenie można wykonać.

Uwagi

Za każdym razem, gdy wartość zwrócona przez element canExecute uległa zmianie, do wyzwolenia CanExecuteChangedjest wymagane wywołanie ChangeCanExecute() .

Dotyczy

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

Źródło:
Command.cs
Źródło:
Command.cs

Inicjuje nowe wystąpienie klasy Command.

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))

Parametry

execute
Action<Object>

Obiekt> akcji<do wykonania po wykonaniu polecenia.

canExecute
Func<Object,Boolean>

Wartość wskazująca Func<T,TResult> , czy polecenie można wykonać.

Uwagi

Za każdym razem, gdy wartość zwrócona przez element canExecute uległa zmianie, do wyzwolenia CanExecuteChangedjest wymagane wywołanie ChangeCanExecute() .

Dotyczy