Back to Devexpress

BarEditItem.AutoFillWidth Property

windowsforms-devexpress-dot-xtrabars-dot-baredititem-4e589e35.md

latest3.7 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(false)]
[SupportedByRibbon(SupportedByRibbonKind.NonSupported)]
public virtual bool AutoFillWidth { get; set; }
vb
<DefaultValue(False)>
<SupportedByRibbon(SupportedByRibbonKind.NonSupported)>
Public Overridable Property AutoFillWidth As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

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.

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.

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

Size

UseWholeRow

MinWidth

MaxWidth

BarEditItem Class

BarEditItem Members

DevExpress.XtraBars Namespace