Click or drag to resize

BindableExtensionsBindT Method (IBindable, IndirectBindingT, Object, IndirectBindingT, DualBindingMode, T, T)

Adds a new binding to the control with an indirect binding to the provided objectValue

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.4.0
Syntax
public static DualBinding<T> Bind<T>(
	this IBindable bindable,
	IndirectBinding<T> controlBinding,
	Object objectValue,
	IndirectBinding<T> objectBinding,
	DualBindingMode mode = DualBindingMode.TwoWay,
	T defaultControlValue = null,
	T defaultContextValue = null
)

Parameters

bindable
Type: Eto.FormsIBindable
Bindable object to add the binding to
controlBinding
Type: Eto.FormsIndirectBindingT
Binding to get/set the value from the control.
objectValue
Type: SystemObject
Object value to bind to.
objectBinding
Type: Eto.FormsIndirectBindingT
Binding to get/set the value from the objectValue.
mode (Optional)
Type: Eto.FormsDualBindingMode
Mode of the binding.
defaultControlValue (Optional)
Type: T
Default control value to set to the objectValue, if the value of the control property is null.
defaultContextValue (Optional)
Type: T
Default context value to set to the control, if the objectValue or value of the objectBinding is null.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:Eto.Forms.BindableExtensions.Bind``1(Eto.Forms.IBindable,Eto.Forms.IndirectBinding{``0},System.Object,Eto.Forms.IndirectBinding{``0},Eto.Forms.DualBindingMode,``0,``0)"]

Return Value

Type: DualBindingT

[Missing <returns> documentation for "M:Eto.Forms.BindableExtensions.Bind``1(Eto.Forms.IBindable,Eto.Forms.IndirectBinding{``0},System.Object,Eto.Forms.IndirectBinding{``0},Eto.Forms.DualBindingMode,``0,``0)"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IBindable. 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