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

BarCustomContainerItemLink.OpenMenu() Method

Opens the BarCustomContainerItem control submenu.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v19.2.dll

Declaration

public void OpenMenu()

Example

The following example shows how you can focus a specific subitem within a container item.

The menu for the mFile item of the BarSubItem class is activated. To do this, the BarCustomContainerItemLink.OpenMenu method is called.

After the menu is opened, we focus the first subitem in it using the BarItemLink.Focus method.

The result is shown below:

BarItemLink_Focus_example

// The item and its link for which the menu should be opened
BarSubItem containerItem = mFile;
BarSubItemLink containerLink = containerItem.Links[0] as BarSubItemLink;
// Open the menu for the link
containerLink.OpenMenu();
// Focus the first link in the menu opened
containerLink.VisibleLinks[0].Focus();            

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the OpenMenu() 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