SetProperty(String, Object?) Method

Definition

Assembly HeadlessTestingFramework.dll

Sets an Avalonia property value using SetCurrentValue to preserve bindings.

public AvaloniaElement SetProperty(string propertyName, object? value)

Parameters

propertyName
String

The property name.

value
Object

The value to set.

Returns

AvaloniaElement
This element for chaining.

Remarks

Uses SetCurrentValue for Avalonia properties to preserve any data bindings. For CLR properties, uses reflection which may break bindings.