Click or drag to resize

BindableExtensionsBindTWidget, TValue Method (TWidget, ExpressionFuncTWidget, TValue, DirectBindingTValue, DualBindingMode)

Bind a control property to the specified sourceBinding direct binding.

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

Parameters

control
Type: TWidget
Control to bind to.
controlProperty
Type: System.Linq.ExpressionsExpressionFuncTWidget, TValue
Control property expression.
sourceBinding
Type: Eto.FormsDirectBindingTValue
Source binding to get/set the values.
mode (Optional)
Type: Eto.FormsDualBindingMode
Mode of the binding.

Type Parameters

TWidget
The type of the control.
TValue
The type of the property.

Return Value

Type: DualBindingTValue

[Missing <returns> documentation for "M:Eto.Forms.BindableExtensions.Bind``2(``0,System.Linq.Expressions.Expression{System.Func{``0,``1}},Eto.Forms.DirectBinding{``1},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