PointerPoint class

Applies to Windows and Windows Phone

Provides basic properties for the input pointer associated with a single mouse, pen/stylus, or touch contact.

In most cases, we recommend that you obtain pointer info through the pointer event handlers of your chosen Windows 8 language framework (Windows Store apps using JavaScript, Windows Store apps using C++, C#, or Visual Basic, or Windows Store apps using DirectX with C++).

If the event argument doesn't expose the pointer details required by your app, you can get access to extended pointer data from the event argument through the getCurrentPoint and getIntermediatePoints methods or currentPoint and intermediatePoints properties. We recommend using the getCurrentPoint and getIntermediatePoints methods as you can specify the context of the pointer data.

The static PointerPoint methods, GetCurrentPoint and GetIntermediatePoints, always use the context of the app.

Syntax


public ref class PointerPoint sealed 

Attributes

[MarshalingBehavior(None)]
[Version(0x06020000)]

Members

The PointerPoint class has these types of members:

Methods

The PointerPoint class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
GetCurrentPoint(UInt32) Retrieves position and state information for the specified pointer.
GetCurrentPoint(UInt32, IPointerPointTransform) Retrieves the transformed information for the specified pointer.
GetIntermediatePoints(UInt32) Retrieves position and state information for the specified pointer, from the last pointer event up to and including the current pointer event.
GetIntermediatePoints(UInt32, IPointerPointTransform) Retrieves the transformed position and state information for the specified pointer, from the last pointer event up to and including the current pointer event.

 

Properties

The PointerPoint class has these properties.

PropertyAccess typeDescription

FrameId

Read-onlyGets the ID of an input frame.

IsInContact

Read-onlyGets a value that indicates whether the physical entity (touch, pen/stylus, or mouse button) is pressed down.

PointerDevice

Read-onlyGets information about the device associated with the input pointer.

PointerId

Read-onlyGets a unique identifier for the input pointer.

Position

Read-onlyGets the location of the pointer input in client coordinates.

Properties

Read-onlyGets extended information about the input pointer.

RawPosition

Read-onlyGets the raw location of the pointer input in client coordinates.

Timestamp

Read-onlyGets the time when the input occurred.

 

Remarks

The PointerPoint class implements IPointerPoint.

See PointerPointProperties for extended properties accessible through Properties.

Note  : This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Examples

In the following example, we query various pointer properties using a PointerPoint object.

No code example is currently available or this language may not be supported.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.UI.Input
Windows::UI::Input [C++]

Metadata

Windows.winmd

See also

Reference
Windows.UI.Input Classes
Windows.Devices.Input
Windows.UI.Core
Windows.UI.Input
Windows.UI.Input.Inking
Windows.UI.Xaml.Input
TypedEventHandler
Conceptual
Responding to user interaction
Guidelines for common user interactions
Developing Windows Store apps (JavaScript and HTML)
Using the Windows Runtime in JavaScript
Touch interaction design
Samples (DOM)
HTML scrolling, panning and zooming sample
Input: DOM pointer event handling sample
Input: Instantiable gestures sample
Samples (Windows Store app APIs)
Input: Device capabilities sample
Input: Ink sample
Input: Manipulations and gestures (JavaScript) sample
Input: Simplified ink sample
Input: Windows 8 gestures sample
Input: XAML user input events sample
XAML scrolling, panning, and zooming sample
Samples (DirectX)
DirectX touch input sample
Input: Manipulations and gestures (C++) sample
Input: Touch hit testing sample
Samples (Win32/Desktop)
Input source identification sample
Touch injection sample
Win32 touch hit-testing sample

 

 

Show:
© 2014 Microsoft. All rights reserved.