Click or drag to resize

BindingDelegateT, TValue Method (FuncT, TValue, ActionT, TValue, ActionT, EventHandlerEventArgs, ActionT, EventHandlerEventArgs, TValue, TValue)

Creates a new indirect delegate binding.

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public static IndirectBinding<TValue> Delegate<T, TValue>(
	Func<T, TValue> getValue,
	Action<T, TValue> setValue = null,
	Action<T, EventHandler<EventArgs>> addChangeEvent = null,
	Action<T, EventHandler<EventArgs>> removeChangeEvent = null,
	TValue defaultGetValue = null,
	TValue defaultSetValue = null
)

Parameters

getValue
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: SystemActionT, EventHandlerEventArgs
Delegate to register the change event, when needed by the consumer of this binding.
removeChangeEvent (Optional)
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.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:Eto.Forms.Binding.Delegate``2(System.Func{``0,``1},System.Action{``0,``1},System.Action{``0,System.EventHandler{System.EventArgs}},System.Action{``0,System.EventHandler{System.EventArgs}},``1,``1)"]

TValue

[Missing <typeparam name="TValue"/> documentation for "M:Eto.Forms.Binding.Delegate``2(System.Func{``0,``1},System.Action{``0,``1},System.Action{``0,System.EventHandler{System.EventArgs}},System.Action{``0,System.EventHandler{System.EventArgs}},``1,``1)"]

Return Value

Type: IndirectBindingTValue

[Missing <returns> documentation for "M:Eto.Forms.Binding.Delegate``2(System.Func{``0,``1},System.Action{``0,``1},System.Action{``0,System.EventHandler{System.EventArgs}},System.Action{``0,System.EventHandler{System.EventArgs}},``1,``1)"]

See Also