BindingExpression<TSource, TOwner, TValue>

A typed binding whose observable path can still be extended or configured.
public sealed class BindingExpression<TSource, TOwner, TValue> : BindingExpression<TValue?> where TSource : class where TOwner : class?
Type parameterSummary
(class) TSourceThe root binding source type.
(class?) TOwnerThe object that owns the selected value.
TValueThe selected source value type.

Methods

ConvertTo

Converts source values before applying them to the control.

public ConvertedBindingExpression<TSource, TOwner, TValue, TTarget> ConvertTo<TTarget>(
  Func<TValue, TTarget> convert)
ParameterSummary
Func<TValue, TTarget> convertConverts source values to control values.
Type parameterSummary
TTargetThe control value type after conversion.

Returns

  • ConvertedBindingExpression<TSource, TOwner, TValue, TTarget>: A converted one-way binding that can optionally be completed as two-way.

Once

Reads once whenever a binding context attaches, without observing later changes.

public OneTimeBindingExpression<TSource, TValue> Once()

Returns

TwoWay

Adds control-to-source updates to this binding.

public TwoWayBindingExpression<TSource, TOwner, TValue> TwoWay(
  Action<TOwner, TValue> write)
ParameterSummary
Action<TOwner, TValue> writeWrites the control value to the object that owns the selected property.

Returns