Skip to main content

BarLinkContainerItem Class

Represents a link container.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v22.1.dll

NuGet Package: DevExpress.Win.Navigation


public class BarLinkContainerItem :


Use the BarLinkContainerItem item to represent a group of item links. This can be useful if you need to display specific bar items within multiple menus.

You can create a BarLinkContainerItem item, populate it with specific item links and then add it to a bar or menu. At design time, the BarLinkContainerItem item is displayed as a single entry. At runtime, however, the BarLinkContainerItem item is expanded to display links it owns.

For instance, we create a BarLinkContainerItem item containing four links: Cut, Copy, Paste and Undo and place the item within an Edit submenu. The following screenshot shows the submenu at design time:


At runtime, the menu will display four items in place of the container item:


To add links to a container item, use the BarCustomContainerItem.ItemLinks property. At design time, you can add links to the container item via the BarManager’s Customization Window.


If you create Bar Items in code, note that these objects may not function properly without being associated with a BarManager or RibbonControl. To create a Bar Item, use a Bar Item constructor that has the BarManager parameter. When creating a Bar Item in code for use within a RibbonControl, use a Bar Item constructor that has the BarManager parameter, and pass the RibbonControl.Manager object as this parameter.

See Also