Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 2.24 KB

uielement_pointercaptures.md

File metadata and controls

34 lines (20 loc) · 2.24 KB
-api-id -api-type
P:Microsoft.UI.Xaml.UIElement.PointerCaptures
winrt property

Microsoft.UI.Xaml.UIElement.PointerCaptures

-description

Gets the set of all captured pointers, represented as Pointer values.

-property-value

The collection of captured pointers, each represented as a Pointer object.

-remarks

For more info on how to capture a pointer and why you might want to do so, see CapturePointer.

Because there are input scenarios such as manipulations that involve more than one pointer point, the Windows Runtime enables capturing more than one pointer at a time. The PointerCaptures property exposes a view of which pointer points are currently captured by the UIElement.

This property's value is calculated based on the results of other actions. Calling CapturePointer adds to the internal collection that PointerCaptures provides a read-only view of. Calling ReleasePointerCapture removes from the collection. ReleasePointerCaptures clears the collection. User action that invalidates pointer capture such as releasing from a pointer point also changes capture state and thus the collection. For more info, see Mouse interactions and Handle pointer input.

The collection is not necessarily indexed by PointerId. To find a specific PointerId, you must check the items in the collection and reference a specific Pointer.

-examples

-see-also

CapturePointer, PointerCaptures, Pointer, Handle pointer input, Relative mouse movement and CoreWindow