Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
UIElement Class
UIElement Methods
 InputHitTest Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
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)
Visual Basic (Declaration)
Public Function InputHitTest ( _
    point As Point _
) As IInputElement
Visual Basic (Usage)
Dim instance As UIElement
Dim point As Point
Dim returnValue As IInputElement

returnValue = instance.InputHitTest(point)
C#
public IInputElement InputHitTest(
    Point point
)
Visual C++
public:
IInputElement^ InputHitTest(
    Point point
)
JScript
public function InputHitTest(
    point : Point
) : IInputElement
XAML
You cannot use methods in XAML.

Parameters

point
Type: System.Windows..::.Point
The offset coordinates within this element.

Return Value

Type: System.Windows..::.IInputElement
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 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker