RelayCommand Constructors

Definition

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.

canExecute
Func<Boolean>

The execution status logic.

Applies to