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