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