Table of Contents

Interface IBinding

Namespace
Avalonia.Data
Assembly
Avalonia.Base.dll

Holds a binding that can be applied to a property on an object.

[NotClientImplementable]
public interface IBinding

Methods

Initiate(AvaloniaObject, AvaloniaProperty?, object?, bool)

Initiates the binding on a target object.

[Obsolete("This API may be removed in Avalonia 12. If you depend on this API, please open an issue with details of your use-case.")]
InstancedBinding? Initiate(AvaloniaObject target, AvaloniaProperty? targetProperty, object? anchor = null, bool enableDataValidation = false)

Parameters

target AvaloniaObject

The target instance.

targetProperty AvaloniaProperty

The target property. May be null.

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.

enableDataValidation bool

Whether data validation should be enabled.

Returns

InstancedBinding

A InstancedBinding or null if the binding could not be resolved.