Click or drag to resize

BindableExtensionsBindTWidget, TSource, TValue Method (TWidget, ExpressionFuncTWidget, TValue, TSource, ExpressionFuncTSource, TValue, DualBindingMode)

Binds a control property to a source property

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.4.0
Syntax
public static DualBinding<TValue> Bind<TWidget, TSource, TValue>(
	this TWidget control,
	Expression<Func<TWidget, TValue>> controlProperty,
	TSource source,
	Expression<Func<TSource, TValue>> sourceProperty,
	DualBindingMode mode = DualBindingMode.TwoWay
)
where TWidget : IBindable

Parameters

control
Type: TWidget
Control to bind to.
controlProperty
Type: System.Linq.ExpressionsExpressionFuncTWidget, TValue
Control property.
source
Type: TSource
Source object to get/set the value from.
sourceProperty
Type: System.Linq.ExpressionsExpressionFuncTSource, TValue
Source property from the data context.
mode (Optional)
Type: Eto.FormsDualBindingMode
Mode of the binding.

Type Parameters

TWidget
The type of control.
TSource
The type of the source object.
TValue
The type of the property.

Return Value

Type: DualBindingTValue

[Missing <returns> documentation for "M:Eto.Forms.BindableExtensions.Bind``3(``0,System.Linq.Expressions.Expression{System.Func{``0,``2}},``1,System.Linq.Expressions.Expression{System.Func{``1,``2}},Eto.Forms.DualBindingMode)"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also