VisualExtensions.

GetVisualAt(IVisual, Point, Func<IVisual, bool>) Method

Summary

Gets the first visual in the visual tree whose bounds contain a point.
Namespace
Avalonia.VisualTree
Containing Type
VisualExtensions

Syntax

public static IVisual GetVisualAt(this IVisual visual, Point p, Func<IVisual, bool> filter)

Parameters

Name Type Description
visual IVisual The root visual to test.
p Point The point.
filter Func<IVisual, bool> A filter predicate. If the predicate returns false then the visual and all its children will be excluded from the results.

Return Value

Type Description
IVisual The visual at the requested point.