Click or drag to resize

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

Binds a control property to the source object using the sourceBinding.

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,
	IndirectBinding<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.
source
Type: TSource
Source object to bind to.
sourceBinding
Type: Eto.FormsIndirectBindingTValue
Binding to get/set the value from the source.
mode (Optional)
Type: Eto.FormsDualBindingMode
Mode of the binding.

Type Parameters

TWidget
The type of the 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,Eto.Forms.IndirectBinding{``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