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

Definition

Assembly HeadlessTestingFramework.dll

Finds controls by a specific property value.

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

Type parameters

T
The type of controls 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

IEnumerable<T>
All controls with the specified property value.