Skip to main content

DelegateCommand(Action, Func<Boolean>) Constructor

Initializes a new instance of the DelegateCommand class.

Namespace: DevExpress.Mvvm

Assembly: DevExpress.WinUI.Mvvm.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

public DelegateCommand(
    Action execute,
    Func<bool> canExecute = null
)

Parameters

Name Type Description
execute Action

The method that is called when the specified command is invoked.

Optional Parameters

Name Type Default Description
canExecute Func<Boolean> null

true if this command can be executed; otherwise, false.

See Also