Click or drag to resize

DelegateCommand Constructor (FuncBoolean, Action)

Initializes a new instance of the DelegateCommand class.

Namespace:  TomsToolbox.Wpf
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll)
Syntax
public DelegateCommand(
	Func<bool>? canExecuteCallback,
	Action? executeCallback
)

Parameters

canExecuteCallback
Type: SystemFuncBoolean
The default can execute callback.
executeCallback
Type: SystemAction
The default execute callback.
Examples
C#
public ICommand EditCommand
{
    get
    {
        return new DelegateCommand(CanEdit, Edit);
    }
}

public bool CanEdit()
{
    .....
See Also