Share via


InputPointerSource.PointerMoved Event

Definition

Occurs when a pointer moves while within the bounds of this InputPointerSource.

// Register
event_token PointerMoved(TypedEventHandler<InputPointerSource, PointerEventArgs const&> const& handler) const;

// Revoke with event_token
void PointerMoved(event_token const* cookie) const;

// Revoke with event_revoker
InputPointerSource::PointerMoved_revoker PointerMoved(auto_revoke_t, TypedEventHandler<InputPointerSource, PointerEventArgs const&> const& handler) const;
public event TypedEventHandler<InputPointerSource,PointerEventArgs> PointerMoved;
function onPointerMoved(eventArgs) { /* Your code */ }
inputPointerSource.addEventListener("pointermoved", onPointerMoved);
inputPointerSource.removeEventListener("pointermoved", onPointerMoved);
- or -
inputPointerSource.onpointermoved = onPointerMoved;
Public Custom Event PointerMoved As TypedEventHandler(Of InputPointerSource, PointerEventArgs) 

Event Type

Remarks

Mouse and pen devices fire PointerMoved events more frequently than touch. A touch point is only detectable if a finger is touching the surface, while a mouse has an onscreen cursor that is always visible, even if no mouse button is pressed, and a pen can hover over a digitizer surface without touching it.

Mouse input is associated with a single pointer assigned when mouse input is first detected, and all mouse-initiated interactions have the same PointerId. Clicking a mouse button (left, wheel, or right) creates a secondary association between the pointer and that button through the PointerPressed event. The PointerReleased event is fired only when that same mouse button is released (no other button can be associated with the pointer until this event is complete). Because of this exclusive association, other mouse button clicks are routed through the PointerMoved event.

Applies to