Edytuj

Udostępnij za pośrednictwem


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 CommunityToolkit.Mvvm.Input.RelayCommand : Action -> CommunityToolkit.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 CommunityToolkit.Mvvm.Input.RelayCommand : Action * Func<bool> -> CommunityToolkit.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