IHitTesterHitTestFirst Method

Hit tests a location to find first visual at the specified point.

Definition

Namespace: Avalonia.Rendering
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
C#
Visual? HitTestFirst(
	Point p,
	Visual root,
	Func<Visual, bool>? filter
)

Parameters

p  Point
The point, in client coordinates.
root  Visual
The root of the subtree to search.
filter  FuncVisual, Boolean
A filter predicate. If the predicate returns false then the visual and all its children will be excluded from the results.

Return Value

Visual
The visual at the specified point, topmost first.

See Also