Summary
Gets an observable for a
AvaloniaProperty
.
- Namespace
- Avalonia
- Containing Type
- Avalonia
Object Extensions
Syntax
public static IObservable<T> GetObservable<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 |
The property. |
Return Value
Type | Description |
---|---|
IObservable |
An observable which fires immediately with the current value of the property on the object and subsequently each time the property value changes. |