Specific DevExpress .NET controls (such as GridControl, TreeList, PivotGridControl, LayoutControl, etc.) have built-in popup menus, which are DXPopupMenu descendants.
You can customize these control menus via corresponding events.
When an event is fired, the menu being customized is passed as the event's parameter. You can access it and add new items or remove existing items if required.
You can create a custom DXPopupMenu menu and manually display it for your control if required. The following sections describe how to customize built-in and custom menus, and how to display custom menus.
The following objects serve as DXPopupMenu elements. To set up a menu, you can add any of these items to a DXPopupMenu's Items collection (DXSubMenuItem.Items - this collection is inherited by the DXPopupMenu class from its ancestor).
A DXPopupMenu object can be displayed as a regular menu, popup bar or RibbonMiniToolbar.
To specify the menu's display mode, set the DXPopupMenu.MenuViewType property to the required enumeration value and use the corresponding menu manager.
When manually displaying a DXPopupMenu, a menu manager can be passed as the popup menu's IDXDropDownControl.Show method.
For built-in menus in DevExpress controls, you can specify a menu manager via a control's MenuManager property.
The following menu managers are available.
-
The SkinMenuManager is capable of displaying a DXPopupMenu as a regular menu.

Note
DXEditMenuItem objects are not supported by the SkinMenuManager. These items, which are used to embed in-place editors into popup controls, are presented only in text (without edit boxes). A DXButtonGroupItem object, which is used to present a set of linked buttons, is displayed as a sub-menu by the SkinMenuManager.
C# |
UserLookAndFeel lf = UserLookAndFeel.Default;
Control parentControl = this;
Point pt;
DXPopupMenu dxPopupMenu = new DXPopupMenu();
dxPopupMenu.MenuViewType = MenuViewType.Menu;
dxPopupMenu.ShowPopup(parentControl, pt);
((IDXDropDownControl)dxPopupMenu).Show(new SkinMenuManager(lf), parentControl, pt);
|
-
The BarManager is capable of displaying DXPopupMenu as a popup bar.

C# |
Control parentControl = this;
Point pt;
DXPopupMenu dxPopupMenu = new DXPopupMenu();
dxPopupMenu.MenuViewType = MenuViewType.Toolbar;
dxPopupMenu.ShowPopup(parentControl, pt);
((IDXDropDownControl)dxPopupMenu).Show(barManager1, parentControl, pt);
|
-
The RibbonControl is capable of displaying a DXPopupMenu as a RibbonMiniToolbar object.

C# |
Control parentControl = this;
Point pt;
DXPopupMenu dxPopupMenu = new DXPopupMenu();
dxPopupMenu.MenuViewType = MenuViewType.RibbonMiniToolbar;
dxPopupMenu.ShowPopup(parentControl, pt);
((IDXDropDownControl)dxPopupMenu).Show(RibbonControl1, parentControl, pt);
|
A number of members affect the DXPopupMenu's look: