RichEditBox.ContextMenuOpening Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the system processes an interaction that displays a context menu.
public:
virtual event ContextMenuOpeningEventHandler ^ ContextMenuOpening;
// Register
event_token ContextMenuOpening(ContextMenuOpeningEventHandler const& handler) const;
// Revoke with event_token
void ContextMenuOpening(event_token const* cookie) const;
// Revoke with event_revoker
RichEditBox::ContextMenuOpening_revoker ContextMenuOpening(auto_revoke_t, ContextMenuOpeningEventHandler const& handler) const;
public event ContextMenuOpeningEventHandler ContextMenuOpening;
function onContextMenuOpening(eventArgs) { /* Your code */ }
richEditBox.addEventListener("contextmenuopening", onContextMenuOpening);
richEditBox.removeEventListener("contextmenuopening", onContextMenuOpening);
- or -
richEditBox.oncontextmenuopening = onContextMenuOpening;
Public Custom Event ContextMenuOpening As ContextMenuOpeningEventHandler
<RichEditBox ContextMenuOpening="eventhandler" />
Event Type
Examples
Tip
For more info, design guidance, and code examples, see Guidelines for context menus.
If you have the WinUI 2 Gallery app installed, click here to open the app and see the Customizing RichEditBox's CommandBarFlyout - adding 'Share' example.