Click or drag to resize

BindableBindingT, TValueBindDataContext 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: SystemString
Name of the property on the data context to bind to.
mode (Optional)
Type: Eto.FormsDualBindingMode
Direction of the binding.

Return Value

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