Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.99 KB

File metadata and controls

32 lines (19 loc) · 1.99 KB
-api-id -api-type
T:Microsoft.UI.Xaml.Input.Pointer
winrt class

Microsoft.UI.Xaml.Input.Pointer

-description

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

-remarks

The Pointer class is used to describe an input device. This class identifies the input device (such as stylus, finger, or mouse) for each pointer event that occurs.

In most cases, we recommend that you get pointer info through the event argument of the pointer event handlers (see PointerRoutedEventArgs).

If the event argument doesn't intrinsically expose the pointer details required by your app, you can get access to extended pointer data through the GetCurrentPoint and GetIntermediatePoints methods of PointerRoutedEventArgs. We recommend using these methods as you can specify the context of the pointer data.

-examples

The following code example shows the usage of Pointer class to find the unique PointerId of each input contact in an app, use the PointerDeviceType to ignore specific forms of input (for example, mouse input) and store the Pointer positions. For additional code that uses the Pointer class, see the Input sample.

[!code-csharpCode]

-see-also

Input sample