Bind(AvaloniaObject, AvaloniaProperty, IBinding, Object) Method
Obsolete.
Use AvaloniaObject.Bind(AvaloniaProperty, IBinding
Binds a property on an AvaloniaObject to an IBinding.
Definition
Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
[ObsoleteAttribute("Use AvaloniaObject.Bind(AvaloniaProperty, IBinding")]
public static IDisposable Bind(
this AvaloniaObject target,
AvaloniaProperty property,
IBinding binding,
Object? anchor = null
)
<ExtensionAttribute>
<ObsoleteAttribute("Use AvaloniaObject.Bind(AvaloniaProperty, IBinding")>
Public Shared Function Bind (
target As AvaloniaObject,
property As AvaloniaProperty,
binding As IBinding,
Optional anchor As Object = Nothing
) As IDisposable
[<ExtensionAttribute>]
[<ObsoleteAttribute("Use AvaloniaObject.Bind(AvaloniaProperty, IBinding")>]
static member Bind :
target : AvaloniaObject *
property : AvaloniaProperty *
binding : IBinding *
?anchor : Object
(* Defaults:
let _anchor = defaultArg anchor null
*)
-> IDisposable
Parameters
- AvaloniaObject
- The object.
- AvaloniaProperty
- The property to bind.
- IBinding
- The binding.
- Object (Optional)
- An optional anchor from which to locate required context. When binding to objects that are not in the logical tree, certain types of binding need an anchor into the tree in order to locate named controls or resources. The anchor parameter can be used to provide this context.
Return Value
IDisposable
An IDisposable which can be used to cancel the binding.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type AvaloniaObject. 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
Reference
AvaloniaObjectExtensions Class
Bind Overload
Avalonia Namespace