Skip to main content
Bar

BarManager Class

Represents a container for bar containers, managing operations on bars and popup menus.

Namespace: DevExpress.Xpf.Bars

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

#Declaration

[ToolboxTabName("DX.14.2: Navigation & Layout")]
[DXToolboxBrowsable]
public class BarManager :
    Decorator,
    IBarManager,
    IBarsSerializableOwner

#Remarks

For a window to support the Bars functionality, you need to use a BarManager component as a container of the bars and your controls. The BarManager component is the main element of the DXBars for Silverlight suite. It represents a container for bar containers (objects displaying bars) and it provides methods to manage bar items, categories, bars and popup menus.

The basic steps of displaying bars on-screen and embedding commands into bars are as follows:

  1. Create bars and add them to the BarManager.Bars collection.
  2. Create bar items, representing various commands, editors, static text, etc and add them to the BarManager.Items collection.
  3. Add the required bar items to a bar's BarItemLinkHolderBase.ItemLinks collection. When adding a bar item to this collection, a bar item link is created referring to this bar item, and it's added to the collection instead. You can add a single bar item to multiple bars, sub-menus and menus.
  4. To allow bars to be docked to the window, create a bar container(s) (a BarContainerControl object), which is a visual object. This can be performed either implicitly via the BarManager.CreateStandardLayout property, or manually.
  5. To dock a bar to a bar container, bind the bar to the container via the Bar.DockInfo property. See the BarContainerControl topic to learn more.
  6. To make a bar floating, set the bar's Bar.DockInfo.ContainerType property to Floating.

    There is no need to create bar containers to allow bars to be floating. Bar containers are only required to dock a bar to the window.

See Also