BindableBindingT, TValueConvertTNewValue Method |
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 BindableBinding<T, TNewValue> Convert<TNewValue>(
Func<TValue, TNewValue> toValue,
Func<TNewValue, TValue> fromValue = null
)
Public Function Convert(Of TNewValue) (
toValue As Func(Of TValue, TNewValue),
Optional fromValue As Func(Of TNewValue, TValue) = Nothing
) As BindableBinding(Of T, TNewValue)
member Convert :
toValue : Func<'TValue, 'TNewValue> *
?fromValue : Func<'TNewValue, 'TValue>
(* Defaults:
let _fromValue = defaultArg fromValue null
*)
-> BindableBinding<'T, 'TNewValue>
Parameters
- toValue
- Type: SystemFuncTValue, TNewValue
Delegate to convert to the new value type. - fromValue (Optional)
- Type: SystemFuncTNewValue, TValue
Delegate to convert from the value to the original binding's type.
Type Parameters
- TNewValue
- Type of the value for the new binding
Return Value
Type:
BindableBindingT,
TNewValue[Missing <returns> documentation for "M:Eto.Forms.BindableBinding`2.Convert``1(System.Func{`1,``0},System.Func{``0,`1})"]
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