PointerEventArgs class

Applies to Windows and Windows Phone

Contains the arguments returned by the last pointer event.

Syntax


public ref class PointerEventArgs sealed : ICoreWindowEventArgs

Attributes

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

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

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

See also

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

 

 

Show:
© 2014 Microsoft