Skip to main content

GetSubject<T>(AvaloniaObject, AvaloniaProperty<T>, BindingPriority) Method

Gets a subject for an AvaloniaProperty.

Definition

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

public static ISubject<T> GetSubject<T>(
this AvaloniaObject o,
AvaloniaProperty<T> property,
BindingPriority priority = BindingPriority.LocalValue
)

Parameters

  AvaloniaObject
The object.
  AvaloniaProperty(T)
The property.
  BindingPriority  (Optional)
The priority with which binding values are written to the object.

Type Parameters

The property type.

Return Value

ISubject(T)
An ISubject which can be used for two-way binding to/from the 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

AvaloniaObjectReactiveExtensions Class
GetSubject Overload
Avalonia.ReactiveUI Namespace