Skip to main content

SetValue<T>(StyledProperty<T>, T, BindingPriority) Method

Sets a AvaloniaProperty value.

Definition​

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

public IDisposable? SetValue<T>(
StyledProperty<T> property,
T value,
BindingPriority priority = BindingPriority.LocalValue
)

Parameters​

  StyledProperty(T)
The property.
  T
The value.
  BindingPriority  (Optional)
The priority of the value.

Type Parameters​

The type of the property.

Return Value​

IDisposable
An IDisposable if setting the property can be undone, otherwise null.

See Also​

Reference​

AvaloniaObject Class
SetValue Overload
Avalonia Namespace