DelegateBindingT, TValue Constructor (FuncT, TValue, ActionT, TValue, ActionT, EventHandlerEventArgs, ActionT, EventHandlerEventArgs, TValue, TValue) |
Namespace:
Eto.Forms
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public DelegateBinding(
Func<T, TValue> getValue,
Action<T, TValue> setValue,
Action<T, EventHandler<EventArgs>> addChangeEvent,
Action<T, EventHandler<EventArgs>> removeChangeEvent,
TValue defaultGetValue = null,
TValue defaultSetValue = null
)
Public Sub New (
getValue As Func(Of T, TValue),
setValue As Action(Of T, TValue),
addChangeEvent As Action(Of T, EventHandler(Of EventArgs)),
removeChangeEvent As Action(Of T, EventHandler(Of EventArgs)),
Optional defaultGetValue As TValue = Nothing,
Optional defaultSetValue As TValue = Nothing
)
new :
getValue : Func<'T, 'TValue> *
setValue : Action<'T, 'TValue> *
addChangeEvent : Action<'T, EventHandler<EventArgs>> *
removeChangeEvent : Action<'T, EventHandler<EventArgs>> *
?defaultGetValue : 'TValue *
?defaultSetValue : 'TValue
(* Defaults:
let _defaultGetValue = defaultArg defaultGetValue null
let _defaultSetValue = defaultArg defaultSetValue null
*)
-> DelegateBinding
Parameters
- getValue
- Type: SystemFuncT, TValue
Delegate to get the value for the binding. - setValue
- Type: SystemActionT, TValue
Delegate to set the value for the binding. - addChangeEvent
- Type: SystemActionT, EventHandlerEventArgs
Delegate to register the change event, when needed by the consumer of this binding. - removeChangeEvent
- Type: SystemActionT, EventHandlerEventArgs
Delegate to remove the change event. - defaultGetValue (Optional)
- Type: TValue
Default get value, when the object instance is null. - defaultSetValue (Optional)
- Type: TValue
Default set value, when the incoming value is null.
See Also