RelayCommand Constructor (Action, FuncBoolean) |
Namespace:
Eto.Forms
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public RelayCommand(
Action execute,
Func<bool> canExecute
)
Public Sub New (
execute As Action,
canExecute As Func(Of Boolean)
)
new :
execute : Action *
canExecute : Func<bool> -> RelayCommand
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