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
)
Public Function BindDataContext (
propertyName As String,
Optional mode As DualBindingMode = DualBindingMode.TwoWay
) As DualBinding(Of TValue)
member BindDataContext :
propertyName : string *
?mode : DualBindingMode
(* Defaults:
let _mode = defaultArg mode DualBindingMode.TwoWay
*)
-> DualBinding<'TValue>
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:
DualBindingTValueThe 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