# Bar Containers | WPF Controls | DevExpress Documentation

A bar container ([BarContainerControl](/WPF/DevExpress.Xpf.Bars.BarContainerControl)) is a control that can display bars ([ToolBarControl](/WPF/DevExpress.Xpf.Bars.ToolBarControl), [MainMenuControl](/WPF/DevExpress.Xpf.Bars.MainMenuControl), [StatusBarControl](/WPF/DevExpress.Xpf.Bars.StatusBarControl) and [Bar](/WPF/DevExpress.Xpf.Bars.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](/WPF/DevExpress.Xpf.Bars.ToolBarControl) and [Bar](/WPF/DevExpress.Xpf.Bars.Bar) objects, wrapped in a bar container. The drag widget allows bars to be dragged and made floating.
- [Bar](/WPF/DevExpress.Xpf.Bars.Bar) objects can only be displayed onscreen when added to or associated with a bar container.

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

![BarContainer](/WPF/images/barcontainer10074.png)

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

## Examples

- [How to: create bars and allow them to be docked at any edge of the window](/WPF/18268/controls-and-libraries/ribbon-bars-and-menu/bars/examples/how-to-create-bars-and-allow-them-to-be-docked-at-any-edge-of-the-window)
- [How to: create a Bars UI using the MVVM design pattern](/WPF/17893/controls-and-libraries/ribbon-bars-and-menu/bars/examples/how-to-create-a-bars-ui-using-the-mvvm-design-pattern)
- [How to: create bar button items and add separators between links](/WPF/6639/controls-and-libraries/ribbon-bars-and-menu/bars/examples/how-to-create-bar-button-items-and-add-separators-between-links)