Skip to main content

Bind<T>(StyledProperty<T>, IObservable<T>, BindingPriority) Method

Binds a AvaloniaProperty to an observable.

Definition

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

public IDisposable Bind<T>(
StyledProperty<T> property,
IObservable<T> source,
BindingPriority priority = BindingPriority.LocalValue
)

Parameters

  StyledProperty(T)
The property.
  IObservable(T)
The observable.
  BindingPriority  (Optional)
The priority of the binding.

Type Parameters

The type of the property.

Return Value

IDisposable
A disposable which can be used to terminate the binding.

See Also

Reference

AvaloniaObject Class
Bind Overload
Avalonia Namespace