InputHitTest(IInputElement, Point, Func<Visual, Boolean>) Method
Returns the topmost active input element at a point on an IInputElement.
Definition
Namespace: Avalonia.Input
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static IInputElement? InputHitTest(
this IInputElement element,
Point p,
Func<Visual, bool> filter
)
<ExtensionAttribute>
Public Shared Function InputHitTest (
element As IInputElement,
p As Point,
filter As Func(Of Visual, Boolean)
) As IInputElement
[<ExtensionAttribute>]
static member InputHitTest :
element : IInputElement *
p : Point *
filter : Func<Visual, bool> -> IInputElement
Parameters
- IInputElement
- The element to test.
- Point
- The point on element.
- 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
IInputElement
The topmost IInputElement at the specified position.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IInputElement. 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
InputExtensions Class
InputHitTest Overload
Avalonia.Input Namespace