[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Collapse]Ribbon, Bars and Menu
   [Expand]Common Features
    [Expand]Getting Started
    [Expand]Bar Layout
    [Collapse]Populating Bars
      Items and Links
     Bar Actions
    [Expand]Runtime Customization
     Saving and Restoring a Bar Layout
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Items and Links

Expanded Overview

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

This topic includes the following sections.

  • Bar Items

    Bar items represent buttons, editors, static items, galleries and item containers.


  • Bar Item Links

    Bar item links represent bar items defined at another location.


Expanded Bar Items

Bar items are buttons, sub-menus, static text, editors, and other elements. They can be added directly to toolbars (ToolBarControl, MainMenuControl, StatusBarControl and Bar objects), sub-menus (BarSubItem), popup menus (PopupMenu and RadialContextMenu) and the RibbonControl.

Bar items are BarItem class descendants. A typical bar item is a button, represented by the BarButtonItem class. Clicking this item fires the BarItem.ItemClick and BarManager.ItemClick events, and also invokes the command assigned to the BarItem.Command property. Other bar item types are described in the The List of Bar Items and Links topic.

When using the BarManager component, you can create bar items in the BarManager.Items collection. This collection can be regarded as the storage of bar items common to all bars and menus. Using this collection is optional from version 2014.2.

To logically organize bar items, you can assign them to Categories. Categories will help an end-user to locate items at runtime using the Customization Window.

Expanded Bar Item Links

There might be cases when a single bar item should be used in multiple locations (bars, popup menus, etc.). To address this task, bar item links can be used.

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. To associate a bar item link with a specific bar item, use the BarItem.BarItemName property.

Like bar items, bar item links can be added as elements to bars, sub-menus, popup menus and Ribbon controls. The bar item link's look-and-feel and functionality are determined by the associated bar item object.

Bar items provide settings to control the default look of its bar item links. They have properties to specify the default caption, glyph, editor width (for edit items), etc. However, you can override these settings for each bar item link.

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.

To access all bar item links for a bar item, use the BarItem.Links property.

Expanded Examples

Expanded See Also

Is this topic helpful?​​​​​​​