Skip to main content
A newer version of this page is available. .
Bar

BarHeaderItem.MultiColumn Property

Gets or sets whether the items below the current BarHeaderItem are displayed in columns.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v21.2.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Navigation

Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Appearance")]
public DefaultBoolean MultiColumn { get; set; }

Property Value

Type Default Description
DefaultBoolean Default

A DefaultBoolean enumeration value that specifies whether the items are displayed in columns.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Remarks

By default, items in sub-menus (BarSubItem objects) and pup-up menus (PopupMenu objects) are displayed in one column. If items in these menus are divided into groups using headers (BarHeaderItem objects), you can set the MultiColumn property to True to display items that follow the current BarHeaderItem in multiple columns. The BarHeaderItem.OptionsMultiColumn property provides access to the settings applied to the multicolumn mode. For example, the number or columns can be specified by the BarHeaderItem.OptionsMultiColumn.ColumnCount property; visibility of item captions is controlled by the BarHeaderItem.OptionsMultiColumn.ShowItemText property.

The following image shows the same sub-menu whose items below the Format header are displayed in single and multiple columns.

BarHeaderItem_SingeColumnBarHeaderItem_MultipleColumns

The MultiColumn property enables the multicolumn mode only for the set of items below the current BarHeaderItem. If this property is set to Default, behavior depends on the settings of the menu that contains the items. To enable the multicolumn mode for all items in sub-menus (BarSubItem objects) or pup-up menus (PopupMenu objects), use the BarLinkContainerItem.MultiColumn and PopupMenu.MultiColumn properties, respectively. The multicolumn mode settings for these menus are accessible using the BarLinkContainerItem.OptionsMultiColumn and PopupMenu.OptionsMultiColumn properties, respectively. Conversely, you can override the global menu settings for the set of items below the current header, using the MultiColumn and BarHeaderItem.OptionsMultiColumn properties.

Moreover, you can use the BarAndDockingController component to control multicolumn mode settings in a centralized way. The BarManagerProperties.OptionsMultiColumn property, accessible using the BarAndDockingController.PropertiesBar property, allows you specify multicolumn mode settings for all sub-menus and pop-up menus controlled by the BarManager (see BarManager.Controller). The settings provided using the BarHeaderItem.OptionsMultiColumn property override these global settings.

See Also