RelayCommand 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
RelayCommand(Action) |
Initializes a new instance of the RelayCommand class that can always execute. |
RelayCommand(Action, Func<Boolean>) |
Initializes a new instance of the RelayCommand class. |
RelayCommand(Action)
Initializes a new instance of the RelayCommand class that can always execute.
public RelayCommand (Action execute);
new Microsoft.Toolkit.Mvvm.Input.RelayCommand : Action -> Microsoft.Toolkit.Mvvm.Input.RelayCommand
Public Sub New (execute As Action)
Parameters
- execute
- Action
The execution logic.
Applies to
RelayCommand(Action, Func<Boolean>)
Initializes a new instance of the RelayCommand class.
public RelayCommand (Action execute, Func<bool> canExecute);
new Microsoft.Toolkit.Mvvm.Input.RelayCommand : Action * Func<bool> -> Microsoft.Toolkit.Mvvm.Input.RelayCommand
Public Sub New (execute As Action, canExecute As Func(Of Boolean))
Parameters
- execute
- Action
The execution logic.