RelayValueCommandTParameter, TValue Constructor |
Namespace:
Eto.Forms
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public RelayValueCommand(
Func<TParameter, TValue> getValue,
Action<TParameter, TValue> setValue,
Action<TParameter> execute = null,
Predicate<TParameter> canExecute = null
)
Public Sub New (
getValue As Func(Of TParameter, TValue),
setValue As Action(Of TParameter, TValue),
Optional execute As Action(Of TParameter) = Nothing,
Optional canExecute As Predicate(Of TParameter) = Nothing
)
new :
getValue : Func<'TParameter, 'TValue> *
setValue : Action<'TParameter, 'TValue> *
?execute : Action<'TParameter> *
?canExecute : Predicate<'TParameter>
(* Defaults:
let _execute = defaultArg execute null
let _canExecute = defaultArg canExecute null
*)
-> RelayValueCommand
Parameters
- getValue
- Type: SystemFuncTParameter, TValue
Delegate to get the value. - setValue
- Type: SystemActionTParameter, TValue
Delegate to set value. - execute (Optional)
- Type: SystemActionTParameter
Delegate to call when the command is executed, which usually changes the value. (optional). - canExecute (Optional)
- Type: SystemPredicateTParameter
Delegate to call to determine if the command can be executed (optional).
See Also