IDXDropDownControl.Show(IDXMenuManager, Control, Point) Method
Displays the current popup control using a menu manager.
Namespace: DevExpress.Utils.Menu
Assembly: DevExpress.Utils.v24.2.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
manager | DevExpress. |
An IDXMenu |
control | Control | A parent control for the current popup control. |
pos | Point | A position where a popup control will be displayed. |
#Remarks
A popup control will be displayed differently according to the menu manager you use. The following menu managers are supported:
SkinMenuManager - This manager displays a popup control as a regular menu.
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.
BarManager - This manager displays a popup control as a popup bar.
RibbonControl - This manager displays a popup control as a RibbonMiniToolbar.
See DXPopupMenu.MenuViewType to learn more.
#Example 1
// Display a DXPopupMenu as a regular menu
UserLookAndFeel lf = UserLookAndFeel.Default;
Control parentControl = this;
Point pt;
DXPopupMenu dxPopupMenu = new DXPopupMenu();
//...
dxPopupMenu.MenuViewType = MenuViewType.Menu;
dxPopupMenu.ShowPopup(parentControl, pt);
//or
((IDXDropDownControl)dxPopupMenu).Show(new SkinMenuManager(lf), parentControl, pt);
#Example 2
// Display a DXPopupMenu as a popup bar
Control parentControl = this;
Point pt;
DXPopupMenu dxPopupMenu = new DXPopupMenu();
//...
dxPopupMenu.MenuViewType = MenuViewType.Toolbar;
dxPopupMenu.ShowPopup(parentControl, pt);
//or
((IDXDropDownControl)dxPopupMenu).Show(barManager1, parentControl, pt);
#Example 3
// Display a DXPopupMenu as a RibbonMiniToolbar
Control parentControl = this;
Point pt;
DXPopupMenu dxPopupMenu = new DXPopupMenu();
//...
dxPopupMenu.MenuViewType = MenuViewType.RibbonMiniToolbar;
dxPopupMenu.ShowPopup(parentControl, pt);
//or
((IDXDropDownControl)dxPopupMenu).Show(RibbonControl1, parentControl, pt);
#Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Show(IDXMenuManager, Control, Point) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.