Windows Dev Center

PointerEventArgs class

Contains the arguments returned by the last pointer event.

Syntax


public ref class PointerEventArgs sealed : ICoreWindowEventArgs

Members

The PointerEventArgs class has these types of members:

Methods

The PointerEventArgs class has these methods. It also inherits methods from the Object class.

MethodDescription
GetIntermediatePoints Retrieves the pointer data for up to the last 64 pointer locations since the last pointer event.

 

Properties

The PointerEventArgs class has these properties.

PropertyAccess typeDescription

CurrentPoint

Read-onlyGets the pointer data of the last pointer event.

Handled

Read/writeGets or sets whether the pointer event was handled.

KeyModifiers

Read-onlyGets 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.

 

Remarks

This object is returned by a delegate registered for one of the following events:



// 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);

    // ...
   
}


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).

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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.Core
Windows::UI::Core [C++]

Metadata

Windows.winmd

Attributes

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

See also

Object
ICoreWindowEventArgs
Input: Manipulations and gestures (C++) sample
Input: Simplified ink sample
Input: Touch hit testing sample

 

 

Show:
© 2015 Microsoft