BarManager.Categories Property

Gets a collection of categories used to logically organize bar items.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v21.1.dll


public BarManagerCategoryCollection Categories { get; }

Property Value

Type Description

A BarManagerCategoryCollection object that represents the collection of categories.


Use this property to access a collection of categories created in the BarManager. Categories are used to logically organize items and this provides a convenient way to access items from the Customization Form. This property allows you to add, remove and get individual categories. Each category is represented by a BarManagerCategory object.

You can assign an item to a specific category by specifying the item’s BarItem.Category property.

For more information, see the How To: Organize Bar Items into Categories document.


The following sample code creates a new category and adds it to the BarManager’s BarManager.Categories collection. Then, the category created is assigned to the first item in the BarManager’s BarManager.Items collection.

if (barManager1.Categories.IndexOf("NewCategory") == -1) {
   barManager1.Items[0].Category = barManager1.Categories.Add("NewCategory");
See Also