ControlBindingT, TValue Constructor (T, FuncT, TValue, ActionT, TValue, ActionT, EventHandlerEventArgs, ActionT, EventHandlerEventArgs) |
Namespace:
Eto.Forms
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public ControlBinding(
T dataItem,
Func<T, TValue> getValue,
Action<T, TValue> setValue = null,
Action<T, EventHandler<EventArgs>> addChangeEvent = null,
Action<T, EventHandler<EventArgs>> removeChangeEvent = null
)
Public Sub New (
dataItem As T,
getValue As Func(Of T, TValue),
Optional setValue As Action(Of T, TValue) = Nothing,
Optional addChangeEvent As Action(Of T, EventHandler(Of EventArgs)) = Nothing,
Optional removeChangeEvent As Action(Of T, EventHandler(Of EventArgs)) = Nothing
)
new :
dataItem : 'T *
getValue : Func<'T, 'TValue> *
?setValue : Action<'T, 'TValue> *
?addChangeEvent : Action<'T, EventHandler<EventArgs>> *
?removeChangeEvent : Action<'T, EventHandler<EventArgs>>
(* Defaults:
let _setValue = defaultArg setValue null
let _addChangeEvent = defaultArg addChangeEvent null
let _removeChangeEvent = defaultArg removeChangeEvent null
*)
-> ControlBinding
Parameters
- dataItem
- Type: T
Data item to get/set the values from/to. - getValue
- Type: SystemFuncT, TValue
Delegate to get the value from the object. - setValue (Optional)
- Type: SystemActionT, TValue
Delegate to set the value to the object. - addChangeEvent (Optional)
- Type: SystemActionT, EventHandlerEventArgs
Delegate to add the change event. - removeChangeEvent (Optional)
- Type: SystemActionT, EventHandlerEventArgs
Delegate to remove the chang event.
See Also