FindFirstByProperty<T, TProperty>(Visual, AvaloniaProperty, TProperty) Method

Definition

Assembly HeadlessTestingFramework.dll

Finds the first control with a specific property value.

public static T? FindFirstByProperty<T, TProperty>(this Visual root, AvaloniaProperty<TProperty> property, TProperty value)
    where T : AvaloniaObject

Type parameters

T
The type of control to find.
TProperty
The type of the property.

Parameters

root
Avalonia.Visual

The root visual to search from.

property
Avalonia.AvaloniaProperty{{TProperty}}

The Avalonia property to check.

value
{TProperty}

The expected property value.

Returns

{T}
The first control with the specified property value, or null if not found.