UIElement.ContextCanceled Event


Occurs when a context input gesture continues into a manipulation gesture, to notify the element that the context flyout should not be opened.

// Register
event_token ContextCanceled(TypedEventHandler<UIElement, RoutedEventArgs const &> const& handler) const;

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

// Revoke with event_revoker
ContextCanceled_revoker ContextCanceled(auto_revoke_t, TypedEventHandler<UIElement, RoutedEventArgs const &> const& handler) const;
public event TypedEventHandler<UIElement,RoutedEventArgs> ContextCanceled;
Public Custom Event ContextCanceled As TypedEventHandler(Of UIElement, RoutedEventArgs) 
<uiElement ContextCanceled="eventhandler"/>

Event Type



You typically handle this event for elements that can be manipulated by drag-and-drop. This event is raised when a ContextRequested event has been raised, but the element has not received a PointerReleased event before a manipulation begins. This indicates that the user intended to invoke a manipulation rather than a context flyout, so the context flyout should not be opened.

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

Applies to

See also