VisualExtensionsIsVisualAncestorOf Method
Tests whether an
Visual is an ancestor of another visual.
Namespace: Avalonia.VisualTreeAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static bool IsVisualAncestorOf(
this Visual? visual,
Visual target
)
<ExtensionAttribute>
Public Shared Function IsVisualAncestorOf (
visual As Visual,
target As Visual
) As Boolean
[<ExtensionAttribute>]
static member IsVisualAncestorOf :
visual : Visual *
target : Visual -> bool
- visual Visual
- The visual.
- target Visual
- The potential descendant.
Boolean
True if
visual is an ancestor of
target;
otherwise false.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Visual. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).