DelayedBinding Class

Summary

Provides delayed bindings for controls.
Namespace
Avalonia.Markup.Data
Base Types
  • object
graph BT Type-->Base0["object"] Type["DelayedBinding"] class Type type-node

Syntax

public static class DelayedBinding

Remarks

The XAML engine applies its bindings in a delayed manner where bindings are only applied when a control has finished initializing. This is done because applying bindings as soon as controls are created means that long-form bindings (i.e. bindings that don't use the `{Binding}` markup extension but instead use `<Binding>`) don't work, as the binding is applied to the property before the properties on the `Binding` object are set. Looking at WPF it uses a similar mechanism for bindings that come from XAML.

Methods

Name Value Summary
Add(IStyledElement, AvaloniaProperty, IBinding) void
Adds a delayed binding to a control.
static
Add(IStyledElement, PropertyInfo, Func<IStyledElement, object>) void
Adds a delayed value to a control.
static
ApplyBindings(IStyledElement) void
Applies any delayed bindings to a control.
static