Click or drag to resize

DirectBindingTConvertTValue Method

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

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


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

Type of the value for the new binding

Return Value

Type: DirectBindingTValue
A new binding with the specified TValue type.
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