[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Collapse]Ribbon, Bars and Menu
      Add and Remove Toolbars
      Add Bar Items To Toolbars
      Bar Item Links
      Provide Functionality to Bar Items
      Toolbar Customization
      Recently Used Items
      Create Popup Menus
     MDI Merging
    [Expand]Bar Manager Designer
    [Expand]Runtime Customization and Layout Management
    [Expand]Appearance and Hotkeys
   [Expand]Popup Menus
    Radial Menu
   [Expand]Common Features
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[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)

Create Popup Menus

Below is a brief tutorial about creating popup menus. Refer to this article for detailed information.

  1. Locate the PopupMenu in VS Toolbox and drop in onto the form (user control).
  2. Invoke the menu smart tag and click the "Customize" link. This will invoke the Customization Window dialog and the popup menu preview.

  3. Drag the menu preview away so it does not overlap the Customization Window and start adding item links to this menu. To add a new bar item, click the [Add] button and select an item type. To add a link to an existing bar item, drag the required item from the Customization Window's "Commands" tab and drop it onto the menu (see the figure below).

  4. You can categorize item links into groups by adding BarHeaderItem items.

    A Bar Header Item provides means of customizing all item links that follow this header. For example, at the figure below the "Alignment" Header Item utilizes the BarHeaderItem.MultiColumn and BarHeaderItem.OptionsMultiColumn properties to arrange links into two columns and enable large glyphs.

  5. Assign your menu to the required control. There are multiple ways of doing this.

    • To associate a menu with a drop-down button, utilize the BarButtonItem.DropDownControl property.
    • When a Bar Manager is present on a form, all controls expose the PopupContextMenu property (in the VS Properties window, this property has a name similar to "PopupContextMenu on barManager1"). Assign your menu to this property and this menu will automatically pop up when end-users right-click the target control.
    • To display a menu manually, call the required PopupMenu.ShowPopup method overload from code.

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