Jaa


UIElement.PointerCaptureLost Event

Definition

Occurs when pointer capture previously held by this element moves to another element or elsewhere.

public:
 virtual event PointerEventHandler ^ PointerCaptureLost;
// Register
event_token PointerCaptureLost(PointerEventHandler const& handler) const;

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

// Revoke with event_revoker
UIElement::PointerCaptureLost_revoker PointerCaptureLost(auto_revoke_t, PointerEventHandler const& handler) const;
public event PointerEventHandler PointerCaptureLost;
function onPointerCaptureLost(eventArgs) { /* Your code */ }
uIElement.addEventListener("pointercapturelost", onPointerCaptureLost);
uIElement.removeEventListener("pointercapturelost", onPointerCaptureLost);
- or -
uIElement.onpointercapturelost = onPointerCaptureLost;
Public Custom Event PointerCaptureLost As PointerEventHandler 
<uiElement PointerCaptureLost="eventhandler"/>

Event Type

Remarks

Important

PointerCaptureLost might fire instead of PointerReleased. Don't rely on PointerPressed and PointerReleased events always occurring in pairs. To function properly, your app must listen for and handle all events that represent likely conclusions to the Press action, and that includes PointerCaptureLost. A pointer can lose capture either because of user interactions or because you programmatically captured another pointer or released the current pointer capture deliberately.

There is no event that fires when a pointer is successfully captured. To capture a pointer, you call the CapturePointer method, and this is usually done within the context of an event handler for other pointer events. For more info on how to capture a pointer and why you might want to do so, see CapturePointer or Mouse interactions.

PointerCaptureLost is a routed event. For more info on the routed event concept, see Events and routed events overview.

PointerCaptureLost supports the ability to attach event handlers to the route that will be invoked even if the event data for the event is marked Handled. See AddHandler.

Applies to

See also