Skip to main content

SetCurrentValue(AvaloniaProperty, Object) Method

Sets the value of a dependency property without changing its value source.

Definition

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

public void SetCurrentValue(
AvaloniaProperty property,
Object? value
)

Parameters

  AvaloniaProperty
The property.
  Object
The value.

Remarks

This method is used by a component that programmatically sets the value of one of its own properties without disabling an application's declared use of the property. The method changes the effective value of the property, but existing data bindings and styles will continue to work. The new value will have the property's current BindingPriority, even if that priority is Unset or Inherited.

See Also

Reference

AvaloniaObject Class
SetCurrentValue Overload
Avalonia Namespace