Skip to main content
Bar

BarEditItem.AutoFillWidth Property

Gets or sets whether links to this BarEditItem are automatically stretched to fill all available free space in the bar.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

Declaration

[DefaultValue(false)]
[SupportedByRibbon(SupportedByRibbonKind.NonSupported)]
public virtual bool AutoFillWidth { get; set; }

Property Value

Type Default Description
Boolean false

true if links to this BarEditItem are automatically stretched to fill all available free space in the bar; otherwise, false.

Remarks

You can use the EditWidth property to specify the item width. If the AutoFillWidth option is enabled, this setting is ignored and the item is automatically stretched to fill all available free space in the bar. In the figure below, you can see the font selector that is not stretched and the same font selector that is stretched.

ItemWidth - AutoFill

If the AutoFillWidth option is enabled, you can use the MinWidth and MaxWidth properties to set the width limits.

If two or more bars reside within the same row, the AutoFillWidth property is in effect only for links that belong to the leftmost bar. Other bars in this row are shrunk to their minimum size. In the image below, the font selector is enlarged in the leftmost bar, while the two following bars are minimized.

ItemWidth - AutoFillWithOtherBars

Note

The AutoFillWidth option is not in effect in the following cases:

Note also that the BarItem.Size.Width and BarEditItem.EditWidth properties are ignored if the AutoFillWidth option is enabled.

Tip

To set a similar behavior for BarEditItem objects hosted within menus, use the BarEditItem.AutoFillWidthInMenu property.

See Also