A newer version of this page is available. Switch to the current version.

BarItemLink Class

Represents the base class for bar item links.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v20.2.dll


The following members accept/return BarItemLink objects:


All elements displayed by Bars, Ribbon and Menus are represented by bar items and bar item links.

A bar item link is a BarItemLink descendant instance that refers to a bar item defined in another location. For instance, you can create an “Open File” bar item that invokes the “Open File” dialog. Then you can add a link to this item within the main menu and add another link to the same item in a toolbar. Use the BarItem.BarItemName property to associate a bar item link with a specific bar item.

Bar item links can be added as elements to bars, sub-menus, popup menus and Ribbon controls.

The following example creates the Edit toolbar. Elements of this toolbar are three bar item links that refer to the items defined in the BarManager.Items collection.

        <dxb:BarButtonItem x:Name="biCut" Content="Cut" Glyph="{dx:DXImage Image=Cut_16x16.png}" LargeGlyph="{dx:DXImage Image=Cut_32x32.png}"/>
        <dxb:BarButtonItem x:Name="biCopy" Content="Copy" Glyph="{dx:DXImage Image=Copy_16x16.png}" LargeGlyph="{dx:DXImage Image=Copy_32x32.png}"/>
        <dxb:BarButtonItem x:Name="biPaste" Content="Paste" Glyph="{dx:DXImage Image=Paste_16x16.png}" LargeGlyph="{dx:DXImage Image=Paste_32x32.png}"/>
        <dxb:Bar Caption="Edit">
            <dxb:BarButtonItemLink BarItemName="biCut"/>
            <dxb:BarButtonItemLink BarItemName="biCopy"/>
            <dxb:BarButtonItemLink BarItemName="biPaste"/>


Refer to the Items and Links topic for more information.


See Also