Skip to main content
Bar

BarLinkContainerItem Class

Represents a link container.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public class BarLinkContainerItem :
    BarCustomContainerItem,
    BarLinksHolder,
    IOptionsMultiColumnOwner,
    IXtraSerializationIdProvider,
    IXtraCollectionDeserializationOptionsProvider,
    IXtraSupportDeserializeCollection

Remarks

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:

Bars3_ContainerItem_AtDesignTime

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

Bars3_ContainerItem_AtRuntime

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.

Important

If you create a bar item in code, associate the bar item with the BarManager or RibbonControl. Use the constructor with the BarManager parameter. To display the bar item within the Ribbon Control, pass the RibbonControl.Manager object as the BarManager parameter.

See Also