导出 (0) 打印
全部展开
信息
您所需的主题如下所示。但此主题未包含在此库中。

PointerEventArgs Class

包含上次指针事件返回的参数。

语法


public ref class PointerEventArgs sealed : ICoreWindowEventArgs

特性

[MarshalingBehavior(Standard)]
[Version(0x06020000)]
[WebHostHidden()]

成员

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

方法

The PointerEventArgs 类 具有这些方法。 它还继承方法于Object 类.

方法说明
GetIntermediatePoints Retrieves the pointer data for up to the last 64 pointer locations since the last pointer event.

 

属性

PointerEventArgs类 具有这些属性。

属性访问类型说明

CurrentPoint

只读Gets the pointer data of the last pointer event.

Handled

读/写Gets or sets whether the pointer event was handled.

KeyModifiers

只读Gets the keyboard key or keys used to modify the pointer input, such as the "Ctrl" key when pressed in conjunction with another key, as in Ctrl+C.

 

备注

此对象由注册为下列事件之一的委托返回:



// returning pointer events data through PointerEventArgs

void MyCoreWindowEvents::SetWindow( // implementation called by CoreApplication::Run(), provided for context
    _In_ CoreWindow^ window
    )
{
    window->PointerCursor = ref new CoreCursor(CoreCursorType::Arrow, 0);

    // ...
    window->PointerPressed +=
        ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &CoreWindowEvents::OnPointerPressed);
    window->PointerReleased +=
        ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &CoreWindowEvents::OnPointerReleased);
    window->PointerMoved +=
        ref new TypedEventHandler<CoreWindow^, PointerEventArgs^>(this, &CoreWindowEvents::OnPointerMoved);

    // ...
   
}


注意  :此类不敏捷,这意味着您需要考虑其线程模型和封送行为。有关更多信息,请参见线程处理和封送处理 (C++/CX)

要求

最低支持客户端

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

最低支持服务器

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

最低支持电话

Windows Phone 8

命名空间

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

元数据

Windows.winmd

另请参见

输入:操作和笔势 (C++) 示例
输入:简化墨迹示例
输入:触控命中测试示例

 

 

显示:
© 2015 Microsoft