-
Home
-
API
-
Avalonia.HeadlessTestingFramework
-
VisualTreeTestHelper
-
Methods
-
FindFirst(Visual, Boolean)
FindFirst(Visual, Boolean) Method
Definition
Finds the first descendant of a specific type in the visual tree.
public static T? FindFirst<T>(this Visual root, 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 of the specified type, or null if not found.