BindingOperations.

Apply(IAvaloniaObject, AvaloniaProperty, InstancedBinding, object) Method

Summary

Applies an InstancedBinding a property on an IAvaloniaObject.
Namespace
Avalonia.Data
Containing Type
BindingOperations

Syntax

public static IDisposable Apply(IAvaloniaObject target, AvaloniaProperty property, InstancedBinding binding, object anchor)

Parameters

Name Type Description
target IAvaloniaObject The target object.
property AvaloniaProperty The property to bind.
binding InstancedBinding The instanced binding.
anchor object 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

Type Description
IDisposable An IDisposable which can be used to cancel the binding.