Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How To: Organize Bar Items into Categories

Categories are bar item groups that can only be viewed by end-users inside the Customization Window dialog.

The most handy way to add categories at design time is utilizing the Customization Window dialog. To invoke it, right-click a Bar Manager and select “Customize”.

Bars - Add Categories 2

Same dialog allows you to group bar items into categories. To do so, click the default “(Unassigned Items)” category and drag-and-drop items to the desired one.

Bars - Drag To Category

To categorize items in code, create a BarManagerCategory object and add it to the BarManager.Categories collection. Then, assign this category to the BarItem.Category properties of all required bar items.

BarManagerCategory cAlignment = new BarManagerCategory();
cAlignment.Name = "Alignment";
barManager1.Categories.Add(cAlignment);
bbiAlignCenter.Category = bbiAlignJustify.Category = bbiAlignLeft.Category =
    bbiAlignRight.Category = cAlignment;