Command<T> Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.