AvaloniaObjectExtensions.

GetBindingObservable<T>(IAvaloniaObject, AvaloniaProperty<T>) Method

Summary

Gets an observable for a AvaloniaProperty.
Namespace
Avalonia
Containing Type
AvaloniaObjectExtensions

Syntax

public static IObservable<BindingValue<T>> GetBindingObservable<T>(this IAvaloniaObject o, AvaloniaProperty<T> property)

Remarks

The subscription to o is created using a weak reference.

Type Parameters

Name Description
T The property type.

Parameters

Name Type Description
o IAvaloniaObject The object.
property AvaloniaProperty<T> The property.

Return Value

Type Description
IObservable<BindingValue<T>> An observable which fires immediately with the current value of the property on the object and subsequently each time the property value changes.