-
Home
-
API
-
Avalonia.HeadlessTestingFramework
-
LogicalTreeTestHelper
-
Methods
-
FindLogicalAncestor(ILogical, Boolean)
FindLogicalAncestor(ILogical, Boolean) Method
Definition
Finds the first logical ancestor of a specific type.
public static T? FindLogicalAncestor<T>(this ILogical logical, bool includeSelf = false)
where T : class
Type parameters
- T
- The type of ancestor to find.
Parameters
- includeSelf
- Boolean
Whether to include the logical itself in the search.
Returns
- {T}
- The first ancestor of the specified type, or null if not found.