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.5.3-dev
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
<ExtensionAttribute>
Public Shared Function Bind(Of TWidget As IBindable, TSource, TValue) (
control As TWidget,
controlProperty As Expression(Of Func(Of TWidget, TValue)),
source As TSource,
sourceBinding As IndirectBinding(Of TValue),
Optional mode As DualBindingMode = DualBindingMode.TwoWay
) As DualBinding(Of TValue)
[<ExtensionAttribute>]
static member Bind :
control : 'TWidget *
controlProperty : Expression<Func<'TWidget, 'TValue>> *
source : 'TSource *
sourceBinding : IndirectBinding<'TValue> *
?mode : DualBindingMode
(* Defaults:
let _mode = defaultArg mode DualBindingMode.TwoWay
*)
-> DualBinding<'TValue> when '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