Class Command
Definition
- Namespace:
- Tizen.NUI.Binding
- Assembly:
- Tizen.NUI.dll
Defines an ICommand implementation that wraps a Action.
C#Copypublic class Command : ICommand
- Inheritance
-
Command
- Derived
Constructors
Declaration
C#Copypublic Command(Action execute)
Parameters
Type | Name | Description |
---|---|---|
Action | execute | An Action to execute when the Command is executed. |
Declaration
C#Copypublic Command(Action execute, Func<bool> canExecute)
Parameters
Type | Name | Description |
---|---|---|
Action | execute | An Action to execute when the Command is executed. |
Func<Boolean> | canExecute | A instance indicating if the Command can be executed. |
Declaration
C#Copypublic Command(Action<object> execute)
Parameters
Type | Name | Description |
---|---|---|
Action<Object> | execute | An instance to execute when the Command is executed. |
Command(Action<Object>, Func<Object, Boolean>)
Initializes a new instance of the Command class.
Declaration
C#Copypublic Command(Action<object> execute, Func<object, bool> canExecute)
Parameters
Type | Name | Description |
---|---|---|
Action<Object> | execute | An Action to execute when the Command is executed. |
Func<Object, Boolean> | canExecute | A instance indicating if the Command can be executed. |
Methods
CanExecute(Object)
Returns a Boolean indicating if the Command can be executed with the given parameter.
Declaration
C#Copypublic bool CanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
Object | parameter | An Object used as parameter to determine if the Command can be executed. |
Returns
Type | Description |
---|---|
Boolean | true if the Command can be executed, false otherwise. |
Declaration
C#Copypublic void ChangeCanExecute()
Declaration
C#Copypublic void Execute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
Object | parameter | An Object used as parameter for the execute Action. |
Events
CanExecuteChanged
Occurs when the target of the Command should reevaluate whether or not the Command can be executed.
Declaration
C#Copypublic event EventHandler CanExecuteChanged
Event Type
Type | Description |
---|---|
EventHandler |