Command Constructors

Definition

Overloads

Command(Action)

Initializes a new instance of the Command class.

Command(Action<Object>)

Initializes a new instance of the Command class.

Command(Action, Func<Boolean>)

Initializes a new instance of the Command class.

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

Initializes a new instance of the Command class.

Command(Action)

Initializes a new instance of the Command class.

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

Parameters

execute
Action

An Action to execute when the Command is executed.

Applies to

Command(Action<Object>)

Initializes a new instance of the Command class.

public Command (Action<object> execute);
new Xamarin.Forms.Command : Action<obj> -> Xamarin.Forms.Command

Parameters

execute
Action<Object>

An Action<object> to execute when the Command is executed.

Remarks

The Action will be executed with a parameter.

Applies to

Command(Action, Func<Boolean>)

Initializes a new instance of the Command class.

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

Parameters

execute
Action

An Action to execute when the Command is executed.

canExecute
Func<Boolean>

A Func<TResult> indicating if the Command can be executed.

Remarks

Whenever the value returned by canExecute has changed, a call to ChangeCanExecute() is required to trigger CanExecuteChanged.

Applies to

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

Initializes a new instance of the Command class.

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

Parameters

execute
Action<Object>

An Action<object> to execute when the Command is executed.

canExecute
Func<Object,Boolean>

A Func<T,TResult> indicating if the Command can be executed.

Remarks

Whenever the value returned by canExecute has changed, a call to ChangeCanExecute() is required to trigger CanExecuteChanged.

Applies to