Skip to main content

GetPropertyChangedObservable Method

Gets an observable that listens for property changed events for an AvaloniaProperty.

Definition

Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public static IObservable<AvaloniaPropertyChangedEventArgs> GetPropertyChangedObservable(
this AvaloniaObject o,
AvaloniaProperty property
)

Parameters

  AvaloniaObject
The object.
  AvaloniaProperty
The property.

Return Value

IObservable(AvaloniaPropertyChangedEventArgs)
An observable which when subscribed pushes the property changed event args each time a PropertyChanged event is raised for the specified property.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type AvaloniaObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

AvaloniaObjectExtensions Class
Avalonia Namespace