Skip to main content
Bar

BarItemLink Class

Represents the base class for bar item links.

Namespace: DevExpress.Xpf.Bars

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

NuGet Package: DevExpress.Wpf.Core

Declaration

The following members return BarItemLink objects:

Remarks

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:BarManager>
    <dxb:BarManager.Items>
        <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:BarManager.Items>
    <dxb:BarManager.Bars>
        <dxb:Bar Caption="Edit">
            <dxb:BarButtonItemLink BarItemName="biCut"/>
            <dxb:BarButtonItemLink BarItemName="biCopy"/>
            <dxb:BarButtonItemLink BarItemName="biPaste"/>
        </dxb:Bar>

    </dxb:BarManager.Bars>
    <Grid/>
</dxb:BarManager>

Refer to the Items and Links topic for more information.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the BarItemLink class.

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.

Implements

See Also