AvaloniaObjectExtensions.

GetObservable(IAvaloniaObject, AvaloniaProperty) Method

Summary

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

Syntax

public static IObservable<object> GetObservable(this IAvaloniaObject o, AvaloniaProperty property)

Remarks

The subscription to o is created using a weak reference.

Parameters

Name Type Description
o IAvaloniaObject The object.
property AvaloniaProperty The property.

Return Value

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