Click or drag to resize

IndirectBindingTConvertTValue Method (FuncT, TValue, FuncTValue, T)

Converts this binding's value to another value using delegates.

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public IndirectBinding<TValue> Convert<TValue>(
	Func<T, TValue> toValue,
	Func<TValue, T> fromValue = null
)

Parameters

toValue
Type: SystemFuncT, TValue
Delegate to convert to the new value type.
fromValue (Optional)
Type: SystemFuncTValue, T
Delegate to convert from the value to the original binding's type.

Type Parameters

TValue
The type to convert to.

Return Value

Type: IndirectBindingTValue

[Missing <returns> documentation for "M:Eto.Forms.IndirectBinding`1.Convert``1(System.Func{`0,``0},System.Func{``0,`0})"]

Remarks
This is useful when you want to cast one binding to another, perform logic when getting/setting a value from a particular binding, or get/set a preoperty of the value.
See Also