다음을 통해 공유


Command<T> Constructors

Definition

Overloads

Command<T>(Action<T>)

Initializes a new instance of the Command class.

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

Initializes a new instance of the Command class.

Command<T>(Action<T>)

Initializes a new instance of the Command class.

public Command (Action<T> execute);
new Xamarin.Forms.Command<'T> : Action<'T> -> Xamarin.Forms.Command<'T>

Parameters

execute
System.Action<T>

An Action to execute when the Command is executed.

Applies to

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

Initializes a new instance of the Command class.

public Command (Action<T> execute, Func<T,bool> canExecute);
new Xamarin.Forms.Command<'T> : Action<'T> * Func<'T, bool> -> Xamarin.Forms.Command<'T>

Parameters

execute
System.Action<T>

An Action to execute when the Command is executed.

canExecute
System.Func<T,System.Boolean>

A System.Func`2 indicating if the Command can be executed.

Applies to