-
Home
-
API
-
Avalonia.HeadlessTestingFramework
-
VisualTreeTestHelper
-
Methods
-
FindFirst(Visual, Func, Boolean)
FindFirst(Visual, Func<T, Boolean>, Boolean) Method
Definition
Finds the first descendant matching a predicate.
public static T? FindFirst<T>(this Visual root, Func<T, bool> predicate, bool includeSelf = false)
where T : class
Type parameters
- T
- The type of control to find.
Parameters
- includeSelf
- Boolean
Whether to include the root in the search.
Returns
- {T}
- The first descendant matching the predicate, or null if not found.