IBinding.

Initiate(IAvaloniaObject, AvaloniaProperty, object, bool) Method

Summary

Initiates the binding on a target object.
Namespace
Avalonia.Data
Containing Type
IBinding

Syntax

InstancedBinding Initiate(IAvaloniaObject target, AvaloniaProperty targetProperty, object anchor = null, bool enableDataValidation = false)

Parameters

Name Type Description
target IAvaloniaObject 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.

Return Value

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