using Avalonia.Metadata;
namespace Avalonia.Data
{
///
/// Holds a binding that can be applied to a property on an object.
///
[NotClientImplementable]
public interface IBinding
{
///
/// Initiates the binding on a target object.
///
/// The target instance.
/// The target property. May be null.
///
/// 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 parameter
/// can be used to provide this context.
///
/// Whether data validation should be enabled.
///
/// A or null if the binding could not be resolved.
///
InstancedBinding? Initiate(
AvaloniaObject target,
AvaloniaProperty? targetProperty,
object? anchor = null,
bool enableDataValidation = false);
}
}