windowsforms-devexpress-dot-xtrabars-dot-baredititem-16c21e5c.md
Gets or sets the item’s maximum width in auto-size mode. Not in effect in a ribbon.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(-1)]
[SupportedByRibbon(SupportedByRibbonKind.NonSupported)]
public virtual int MaxWidth { get; set; }
<DefaultValue(-1)>
<SupportedByRibbon(SupportedByRibbonKind.NonSupported)>
Public Overridable Property MaxWidth As Integer
| Type | Default | Description |
|---|---|---|
| Int32 | -1 |
An integer value that specifies the item’s maximum width.
|
If the AutoFillWidth option is enabled, the item is automatically stretched to fill all the available space in the bar. In the figure below, the font selector is automatically stretched when the form is resized.
The MinWidth and MaxWidth properties specify the minimum and maximum widths for this item. In the figure below, the font selector’s minimum and maximum widths are limited.
Note
The AutoFillWidthInMenu option allows you to automatically stretch the item when it is displayed in a menu. The MinWidth and MaxWidth properties are not in effect for items in menus.
See Also