TextBox.ContextMenuOpening Event

Definition

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

C#
public event ContextMenuOpeningEventHandler ContextMenuOpening;
XAML
<TextBox ContextMenuOpening="eventhandler" />

Event Type

Examples

Tip

For more info, design guidance, and code examples, see Text box.

The WinUI 3 Gallery app includes interactive examples of most WinUI 3 controls, features, and functionality. Get the app from the Microsoft Store or get the source code on GitHub.

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 more info, see Guidelines for context menus.

Applies to

Product Versions
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6

See also