Skip to main content
A newer version of this page is available. .
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.v19.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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AutoFillWidth property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also