TypedBinding<TIn, TOut> Class

Definition

A binding whose input and output are strongly-typed.

public class TypedBinding<TIn, TOut>
    where TIn : class

Type parameters

TIn
The binding input.
TOut
The binding output.

Remarks

TypedBinding<TIn, TOut> represents a strongly-typed binding as opposed to Avalonia.Data.Binding which boxes value types. It is represented as a set of delegates:

  • Read reads the value given a binding input
  • Write writes a value given a binding input
  • Links holds a collection of delegates which when passed a binding input return each object traversed by Read. For example if Read is implemented as x => x.Foo.Bar.Baz then there would be three links: x => x.Foo, x => x.Foo.Bar and x => x.Foo.Bar.Baz. These links are used to subscribe to change notifications.

This class represents a binding which has not been instantiated on an object. When the Bind(AvaloniaObject, DirectPropertyBase<TOut>) or Bind(AvaloniaObject, StyledProperty<TOut>) methods are called, then an instance of TypedBindingExpression<TIn, TOut> is created which represents the binding instantiated on that object.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Properties (7)

Methods (3)