Click or drag to resize

RelayCommand Constructor (Action, FuncBoolean)

Initializes a new instance of the RelayCommand class.

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public RelayCommand(
	Action execute,
	Func<bool> canExecute
)

Parameters

execute
Type: SystemAction
Delegate to execute the command.
canExecute
Type: SystemFuncBoolean
Delegate to determine the state of whether the command can be executed.
Remarks
This constructor allows you to specify whether the command can be executed. If the state of the canExecute delegate changes, you can call UpdateCanExecute to tell the control that is bound to this command to call the delegate again.
See Also