Skip to main content
A newer version of this page is available. .
Bar

PopupMenu.ShowPopup(Point) Method

Displays the current PopupMenu at the specified screen point.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v18.2.dll

Declaration

public override void ShowPopup(
    Point p
)

Parameters

Name Type Description
p Point

A screen point at which the current PopupMenu is displayed.

Remarks

The specified Point coordinates must be in pixels.

You can display a RibbonMiniToolbar and a popup menu simultaneously. First, assign a popup menu to a toolbar via the RibbonMiniToolbar.PopupMenu property, or assign a toolbar to a popup menu via the PopupMenu.RibbonToolbar property. Then, call the RibbonMiniToolbar.Show or the PopupMenu.ShowPopup method.

Example

The following code displays a specific PopupMenu if the right mouse button is pressed:

private void Form1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) {
    if(e.Button == MouseButtons.Right)
        popupMenu1.ShowPopup(Control.MousePosition);
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowPopup(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.

See Also