windowsforms-devexpress-dot-xtrabars-dot-baredititem-c33da287.md
Gets or sets whether links to this BarEditItem are stretched to fit the menu width.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(DefaultBoolean.Default)]
public virtual DefaultBoolean AutoFillWidthInMenu { get; set; }
<DefaultValue(DefaultBoolean.Default)>
Public Overridable Property AutoFillWidthInMenu As DefaultBoolean
| Type | Default | Description |
|---|---|---|
| DefaultBoolean | Default |
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 | Return Value |
|---|---|---|
| True |
The value is true.
|
0
| | False |
The value is false.
|
1
| | Default |
The value is specified by a global option or a higher-level object.
|
2
|
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:
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.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.AutoFillWidthInMenu property equals True, the editor automatically fills all the space available and consumes the gap seen in the Font Size item.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.
Tip
To set a similar behavior for BarEditItem objects hosted within regular toolbars, use the BarEditItem.AutoFillWidth property.
See Also