Windows.UI.Xaml.Controls.TextBox.ContextMenuOpening

March 5, 2022 ยท View on GitHub

-description

Occurs when the system processes an interaction that displays a context menu.

-xaml-syntax

<TextBox ContextMenuOpening="eventhandler" />

-remarks

To override or add commands to the context menu, you can handle the ContextMenuOpening event and replace the default menu with a custom menu. For an example of this, see the Customizing RichEditBox's CommandBarFlyout - adding 'Share' example in the WinUI 2 Gallery. For design info, see Guidelines for context menus.

-examples

-see-also

ContextMenuOpeningEventHandler, Guidelines for context menus, ContextMenu sample