Bar

BarLinkContainerItem Class

Represents a link container.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v20.1.dll

Declaration

public class BarLinkContainerItem :
    BarCustomContainerItem,
    BarLinksHolder,
    IOptionsMultiColumnOwner,
    IXtraSerializationIdProvider,
    IXtraCollectionDeserializationOptionsProvider,
    IXtraSupportDeserializeCollection
Public Class BarLinkContainerItem
    Inherits BarCustomContainerItem
    Implements 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.

NOTE

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