BarEditItem.AutoFillWidthInMenu Property

Gets or sets whether links to this BarEditItem are stretched to fit the menu width.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v21.2.dll


public virtual DefaultBoolean AutoFillWidthInMenu { get; set; }

Property Value

Type Default Description


True, if the item is stretched up to the menu width; False, if the item uses its width settings; Default, if the behavior is inherited from the parent menu.

Available values:

Name Description

Corresponds to a Boolean value of true.


Corresponds to a Boolean value of false.


The default behavior determined by the control’s logic.


The BarItem.Size.Width and BarEditItem.EditWidth properties allow you to specify the item and editor width. Set the AutoFillWidthInMenu property to True to ignore these settings and automatically stretch the item up to the menu width.

The figure below shows several items with the following settings:

  • The Style bar edit item has the editor width set to 300 pixels. For this item, the AutoFillWidthInMenu property value is irrelevant, since its editor is the widest item within the menu and there is no free space that the editor can automatically fill.
  • The Font Size bar edit item contains a 100 pixels wide editor and has the AutoFillWidthInMenu property set to False. This item is drawn with its own width, which causes a clearly visible gap between the editor and the item caption.
  • The Find bar edit item is only 50 pixels wide, so it should be even shorter than the previous edit item. But since its AutoFillWidthInMenu property equals True, the editor automatically fills all the space available and consumes the gap seen in the Font Size item.

    XtraBars - AutoFillWidthInMenu

If the AutoFillWidthInMenu property is set to Default, the BarEditItem derives its behavior from the parent pop-up menu or sub-menu. To specify this global behavior common to all editors within a menu, use the BarSubItem.AutoFillEditorWidth or PopupMenu.AutoFillEditorWidth property.


To set a similar behavior for BarEditItem objects hosted within regular toolbars, use the BarEditItem.AutoFillWidth property.

See Also