展开 最小化

PointerPointProperties Class

PointerPoint 对象提供扩展的属性。

在大多数情况下,我们建议您通过您选择的 Windows 8 语言框架(使用 JavaScript 的 Windows 应用商店应用程序、使用 C++、C# 或 Visual Basic 的 Windows 应用商店应用程序,或使用 DirectX 与 C++ 的 Windows 应用商店应用程序)的指针事件处理程序获取指针信息。

如果事件参数不公开您的应用程序所需的指针详细信息,则可以通过 getCurrentPointgetIntermediatePoints 方法或 currentPointintermediatePoints 属性从事件参数中获取对扩展指针数据的访问权限。建议使用 getCurrentPointgetIntermediatePoints 方法,因为这样您可以指定指针数据的上下文。

静态 PointerPoint 方法 GetCurrentPointGetIntermediatePoints 始终使用该应用程序的上下文。

语法

Public NotInheritable Class PointerPointProperties

特性

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

成员

PointerPointProperties类 具有这些类型的成员:

方法

The PointerPointProperties 类 具有这些方法。 对于 C#、Visual Basic 和 C++,它还继承方法于Object 类.

方法说明
GetUsageValue Gets the Human Interface Device (HID) usage value of the raw input.
HasUsage Gets a value that indicates whether the input data from the pointer device contains the specified Human Interface Device (HID) usage information.

 

属性

PointerPointProperties类 具有这些属性。

属性访问类型说明

ContactRect

只读Gets the bounding rectangle of the contact area (typically from touch input).

ContactRectRaw

只读Gets the bounding rectangle of the raw input (typically from touch input).

IsBarrelButtonPressed

只读Gets a value that indicates whether the barrel button of the pen/stylus device is pressed.

IsCanceled

只读Gets a value that indicates whether the input was canceled by the pointer device.

IsEraser

只读Gets a value that indicates whether the input is from a digitizer eraser.

IsHorizontalMouseWheel

只读Gets a value that indicates whether the input is from a mouse tilt wheel.

IsInRange

只读Gets a value that indicates whether the pointer device is within detection range of a sensor or digitizer.

IsInverted

只读Gets a value that indicates whether the digitizer pen is inverted.

IsLeftButtonPressed

只读Gets a value that indicates whether the input is from the left button of a mouse or other input method.

IsMiddleButtonPressed

只读Gets a value that indicates whether the input is from the middle button of a mouse or other input method.

IsPrimary

只读Gets a value that indicates whether the input is from the primary pointer when multiple pointers are registered.

IsRightButtonPressed

只读Gets a value that indicates whether the input is from the right button of a mouse or other input method.

IsXButton1Pressed

只读Gets the pressed state of the first extended mouse button.

IsXButton2Pressed

只读Gets the pressed state of the second extended mouse button.

MouseWheelDelta

只读Gets a value (the raw value reported by the device) that indicates the change in wheel button input from the last pointer event.

Orientation

只读Gets the counter-clockwise angle of rotation around the major axis of the pointer device (the z-axis, perpendicular to the surface of the digitizer).

PointerUpdateKind

只读Gets the kind of pointer state change.

Pressure

只读Gets a value that indicates the force that the pointer device (typically a pen/stylus) exerts on the surface of the digitizer.

TouchConfidence

只读Gets a value that indicates whether the pointer device rejected the touch contact.

Twist

只读Gets the clockwise rotation in degrees of a pen device around its own major axis (such as when the user spins the pen in their fingers).

XTilt

只读Gets the plane angle between the Y-Z plane and the plane that contains the Y axis and the axis of the input device (typically a pen/stylus).

YTilt

只读Gets the plane angle between the X-Z plane and the plane that contains the X axis and the axis of the input device (typically a pen/stylus).

 

备注

PointerPointProperties 类实现 IPointerPointProperties。

注意  :此类不敏捷,这意味着您需要考虑其线程模型和封送行为。有关更多信息,请参见线程处理和封送处理 (C++/CX)在多线程环境中使用 Windows 运行时对象 (.NET)

示例

在以下示例中,我们使用 PointerPoint 对象查询各种扩展指针属性。

目前没有可用的代码示例或不支持该语言。

要求

最低支持客户端

Windows 8 [仅 Windows 应用商店应用程序]

最低支持服务器

Windows Server 2012 [仅 Windows 应用商店应用程序]

最低支持电话

Windows Phone 8

命名空间

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

元数据

Windows.winmd

另请参见

引用
Windows.UI.Input 类
Windows.UI.Input.PointerPoint.properties
Windows.Devices.Input
Windows.UI.Core
Windows.UI.Input
Windows.UI.Input.Inking
Windows.UI.Xaml.Input
TypedEventHandler
概念
响应用户交互
常见用户交互准则
开发 Windows 应用商店应用(JavaScript 和 HTML)
使用在 JavaScript 上的 Windows 运行时
触控交互模型
示例 (DOM)
HTML 滚动、平移和缩放示例
输入:DOM 指针事件处理示例
输入:可实例化笔势示例
示例(Windows 应用商店应用  API)
输入:设备功能示例
输入:墨迹示例
输入:操作和笔势 (JavaScript) 示例
输入:简化墨迹示例
输入:Windows 8 笔势示例
输入:XAML 用户输入事件示例
XAML 滚动、平移和缩放示例
示例 (DirectX)
DirectX 触控输入示例
输入:操作和笔势 (C++) 示例
输入:触控命中测试示例
示例(Win32/桌面)
输入源标识示例
触摸注入示例
Win32 触控命中测试示例

 

 

显示:
© 2014 Microsoft