GetVisualsAt(Visual, Point, Func<Visual, Boolean>) Method
Enumerates the visuals in the visual tree whose bounds contain a point.
Definition
Namespace: Avalonia.VisualTree
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static IEnumerable<Visual> GetVisualsAt(
this Visual visual,
Point p,
Func<Visual, bool> filter
)
<ExtensionAttribute>
Public Shared Function GetVisualsAt (
visual As Visual,
p As Point,
filter As Func(Of Visual, Boolean)
) As IEnumerable(Of Visual)
[<ExtensionAttribute>]
static member GetVisualsAt :
visual : Visual *
p : Point *
filter : Func<Visual, bool> -> IEnumerable<Visual>
Parameters
- Visual
- The root visual to test.
- Point
- The point.
- Func(Visual, Boolean)
- A filter predicate. If the predicate returns false then the visual and all its children will be excluded from the results.
Return Value
IEnumerable(Visual)
The visuals at the requested point.
Usage Note
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).
See Also
Reference
VisualExtensions Class
GetVisualsAt Overload
Avalonia.VisualTree Namespace