BindingFactory

Builds binding expressions for typed sources.

Prefer the Bind(...) helper on ContentView<TViewModel>.

public static class BindingFactory

Methods

Bind

Starts a binding that can only write control values to a source.

public static ToSourceBindingBuilder<TSource> Bind<TSource>() where TSource : class
Type parameterSummary
(class) TSourceThe binding source type.

Returns

Bind

Starts a one-way binding that reads a source property.

public static BindingExpression<TSource, TSource, TValue> Bind<TSource, TValue>(
  Func<TSource, TValue> read,
  string? path = null) where TSource : class
ParameterSummary
Func<TSource, TValue> readThe source property to read.
(optional) string? pathThe captured source expression used to identify the property path.
Type parameterSummary
(class) TSourceThe binding source type.
TValueThe property value type.

Returns

  • BindingExpression<TSource, TSource, TValue>: A binding whose path can be extended or converted.