FindAllLogical(ILogical, Func<T, Boolean>, Boolean) Method

Definition

Assembly HeadlessTestingFramework.dll

Finds all logical descendants matching a predicate.

public static IEnumerable<T> FindAllLogical<T>(this ILogical root, Func<T, bool> predicate, bool includeSelf = false)
    where T : class

Type parameters

T
The type of controls to find.

Parameters

root
Avalonia.LogicalTree.ILogical

The root logical to search from.

predicate
Func<T, Boolean>

The predicate to match controls against.

includeSelf
Boolean

Whether to include the root in the search.

Returns

IEnumerable<T>
All descendants matching the predicate.