Click or drag to resize

DelegateCommandT(PredicateT, ActionT) Constructor

Initializes a new instance of the DelegateCommandT class.

Namespace: TomsToolbox.Wpf
Assembly: TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
public DelegateCommand(
	Predicate<T>? canExecuteCallback,
	Action<T>? executeCallback
)

Parameters

canExecuteCallback  PredicateT
The default can execute callback.
executeCallback  ActionT
The default execute callback.
Example
C#
public ICommand EditCommand
{
    get
    {
        return new DelegateCommand<Item>(CanEdit, Edit);
    }
}

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