HasAncestor(Visual) Method

Definition

Assembly HeadlessTestingFramework.dll

Checks if the visual has an ancestor of a specific type.

public static bool HasAncestor<T>(this Visual visual)
    where T : class

Type parameters

T
The type of ancestor to check for.

Parameters

visual
Avalonia.Visual

The visual to check.

Returns

Boolean
True if an ancestor of the specified type exists.