Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UIElement.InputHitTest Method

Returns the input element within the current element that is at the specified coordinates, relative to the current element's origin.

Namespace: System.Windows
Assembly: PresentationCore (in presentationcore.dll)

public IInputElement InputHitTest (
	Point point
)
public IInputElement InputHitTest (
	Point point
)
public function InputHitTest (
	point : Point
) : IInputElement
You cannot use methods in XAML.

Parameters

point

The offset coordinates within this element.

Return Value

The element child that is located at the given position.

IInputElement is returned as the return type, because that type is a common interface for both UIElement and ContentElement. You can then cast the return type appropriately, or use the interface instance for certain members that are defined by the IInputElement interface.

This method typically is not called from your application code. Calling this method is only appropriate if you intend to re-implement a substantial amount of the low level input features that are already present, such as recreating mouse device logic.

IContentHost contracts an InputHitTest method with the same signature, which some elements choose to implement explicitly.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft