[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]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Collapse]Ribbon, Bars and Menu
   [Expand]Common Features
    [Expand]Getting Started
    [Collapse]Bar Layout
      Bar Manager
      Standalone Bar Controls
      Bar Containers
    [Expand]Populating Bars
     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)

Bar Containers

A bar container (BarContainerControl) is a control that can display bars (ToolBarControl, MainMenuControl, StatusBarControl and Bar). You can use bar containers to accomplish several tasks.

  • To display a bar(s) at any position within the window, add a bar container at this position, and then add the bar(s) to this bar container.
  • Bars wrapped in a bar container are displayed side-by-side, without overlapping.
  • A drag widget is displayed for ToolBarControl and Bar objects, wrapped in a bar container. The drag widget allows bars to be dragged and made floating.
  • Bar objects can only be displayed onscreen when added to or associated with a bar container.

When using the BarManager component, four bar containers are implicitly added at the top, left, right and bottom edges of the BarManager (provided that the BarManager.CreateStandardLayout property is set to true; this is the default value). You can display a Bar object at any of these edges by associating the bar with a corresponding bar container using the Bar.DockInfo property. A bar container is invisible, unless a bar is docked to the container.

To create a floating bar in XAML, define a Bar object in the BarManager.Bars collection and set its Bar.DockInfo.ContainerType (BarDockInfo.ContainerType) property to BarContainerType.Floating.

Expanded Examples

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