Constructor RelayCommand
RelayCommand(Action?)
Initializes a new instance of the RelayCommand<T> class.
Declaration
public RelayCommand(Action? execute)
Parameters
Type | Name | Description |
---|---|---|
Action | execute | The action to execute. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if the action is null. |
RelayCommand(Action, Func<bool>)
Initializes a new instance of the RelayCommand<T> class.
Declaration
public RelayCommand(Action execute, Func<bool> canExecute)
Parameters
Type | Name | Description |
---|---|---|
Action | execute | The action to execute. |
Func<bool> | canExecute | Predicate used to determine if the command can execute. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if the action is null. |