Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Collapse]Ribbon, Bars and Menu
   [Expand]Common Features
   [Collapse]Bars
    [Expand]Getting Started
    [Expand]Bar Layout
    [Expand]Populating Bars
     Bar Actions
    [Expand]Runtime Customization
    [Expand]Examples
     Saving and Restoring a Bar Layout
   [Expand]Ribbon
   [Expand]Menus
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Bars

Overview


Bars (also known as Toolbars) implement the hierarchical menu model in applications; this model is the traditional way of organizing application command regions. Use the DevExpress BarManager component to create and customize toolbars in a centralized manner or standalone Bar controls to tweak each bar separately.

Each bar is a horizontally or vertically aligned stripe that contains buttons, editors, radio button groups, etc. There are three toolbar types.

  • Main menu bar - the topmost bar that is stretched across the entire form. Contains buttons with no images. Each button is a category (e.g., 'File', 'Edit', 'Format') that displays other buttons and sub-items when clicked.
  • Status bar - the bar that is stretched across the bottom edge of the form. Commonly, this bar contains labels that display the current application status and a size grip element that allows end-users to resize the form.
  • Regular toolbars - toolbars that contain buttons and editors that represent the most frequently used actions (e.g., creating new documents, font settings or text alignment). Buttons within these bars usually display their icons only. Traditionally these toolbars are arranged below the main menu bar, although you are free to dock them to the left or right side of your form, or make them floating.

Toolbars of all types used within the application form create a toolbar system. The Bar Manager component provides organized access to this entire system. Additionally, you can provide context and pop-up menus for your toolbar system. Follow the links below to learn more about Bars concepts and features.

Start Here


  • Getting Started
    Contains tutorials on the DevExpress Bars Suite.

  • Examples
    Contains a large variety of task-based examples.

Creating Bar Layout


There are two ways to create your bar layout. The traditional approach is to use the Bar Manager component that owns multiple Bar objects. This approach comes with multiple benefits, such as sharing bar items between separate bars, or the centralized control over bar appearances and settings. On the other hand, when you do not need multiple bars within one window, you can follow the simplified approach and use standalone bar controls. Each standalone bar control represents a bar of the specific type (main menu bar, status bar, regular toolbar) that does not require a parent Bar Manager component. Topics in this section provide detailed information on both approaches.

  • Bar Manager
    A component that provides centralized access over bars and popup menus.

  • Bars
    Bars contain commands, sub-menus, static text, editors, etc. Each bar is owned by a parent Bar Manager component.

  • Standalone Bar Controls
    This topic enumerates all controls that allow you to create standalone bars that do not require a parent Bar Manager component.

  • Bar Containers
    Bar Containers are objects that host one or multiple bars (both standalone and owned by a Bar Manager). These containers allow you to dock your bars to the desired sides of an application window or make them floating.

Populating Bars


After your bar layout is ready, you can proceed to populating your bars with different types of elements - regular push buttons, check boxes, buttons with drop-down menus, etc. This can also be achieved using two different approaches. You can either directly declare required elements within a bar, or use links to already existing elements. In the first case, you use bar items, in the latter - bar item links. Refer to the links below to learn more.

Actions


Actions are commands that tell a Bar Manager to perform specific operations, such as creating bars, bar items and bar item links, or modifying the existing structure of a Bar Manager. Actions are defined in resources and thus can be shared between multiple windows or even applications. See the following link to learn more.

  • Bar Actions
    Contains detailed information on creating and executing actions.

Runtime Customization


This section illustrates how to grant your end-users access to both hidden & visible bars and bar commands, and allow them to adjust required bar options.

  • Quick Customization
    Contains a list of tasks that can be performed at runtime using the Customization Window.

  • Customization Window
    Describes the Customization Window - a dialog invoked at runtime that allows your end-users to customize bars and bar commands.

  • Categories
    Categories are assigned to bar items in order to group them in a Customization Window at runtime.

Miscellaneous


  • MDI Bar Merging
    With the bar merging feature, child menus and bars from child MDI windows are merged into the parent MDI window menus and bars.

  • MVVM Support
    Learn about implementing the MVVM pattern in your applications using DXBars, DXRibbon and GalleryControl components.

  • Saving and Restoring a Bar Layout
    A bar layout can be saved to a data store (an XML file or a stream), and then restored from this data store, overriding the changes made since the layout was saved. This document provides information on this topic.

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