Click or drag to resize

DelegateCommandT Constructor (PredicateT, ActionT)

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

Parameters

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

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