Skip to main content

DelegateCommand(Action<T>, Func<T, Boolean>) Constructor

Initializes a new instance of the DelegateCommand<T> class with specified settings.

Namespace: DevExpress.Mvvm

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

NuGet Package: DevExpress.WinUI

Declaration

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

Parameters

Name Type Description
execute Action<T>

The method that is called when the specified command is invoked. The method’s parameter is the command parameter.

Optional Parameters

Name Type Default Description
canExecute Func<T, Boolean> null

A delegate that determines whether a command can be executed.

See Also