Click or drag to resize

BindableBinding<T, TValue>.BindDataContext Method (String, DualBindingMode)

Binds to the specified propertyName of the current data context.

Namespace:  Eto.Forms
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public DualBinding<TValue> BindDataContext(
	string propertyName,
	DualBindingMode mode = DualBindingMode.TwoWay
)

Parameters

propertyName
Type: System.String
Name of the property on the data context to bind to.
mode (Optional)
Type: Eto.Forms.DualBindingMode
Direction of the binding.

Return Value

Type: DualBinding<TValue>
The binding between the data context and this binding.
Remarks
This is a shortcut to using the PropertyBinding<T>. This has the advantage of registering automatically to INotifyPropertyChanged or to an event named after the property with a "Changed" suffix.
See Also