[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Collapse]Windows 10 App Controls
 [Expand]Getting Started
  [Expand]Navigation and Layout
  [Expand]Data Editors
  [Expand]Data Grid
  [Expand]Map Control
  [Expand]PDF Viewer
   SVG Icon
   Context Menu
 [Expand]Themes and Color Schemes
  Get More Help
 [Expand]API Reference
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Context Menu

The Context Menu is a flyout menu that can be invoked by right-clicking or pressing and holding a UI element. It provides end-users with the ability to perform actions linked to this element.

Context Menus are represented by the ContextMenu class. You can add a context menu to any UI element using the ContextMenu.Menu attached property. The ContextMenu.Content property specifies the flyout content that can be represented by a Windows.UI.Xaml.UIElement descendant or Windows.UI.Xaml.DataTemplate instance.

Use the ContextMenu.Header property to specify the menu header.

The example below illustrates how to add a text formatting menu to a native TextBox.

The Data Grid and Hamburger Menu provide built-in context menus. To learn more, see Data Grid Context Menus and Hamburger Menu Context Menus.

Is this topic helpful?​​​​​​​