windowsforms-devexpress-dot-xtralayout-dot-optionsview-425e34b8.md
Gets or sets how the LayoutControl adjusts its size when placed inside another LayoutControl.
Namespace : DevExpress.XtraLayout
Assembly : DevExpress.XtraLayout.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(AutoSizeModes.UseMinSizeAndGrow)]
public AutoSizeModes AutoSizeInLayoutControl { get; set; }
<DefaultValue(AutoSizeModes.UseMinSizeAndGrow)>
Public Property AutoSizeInLayoutControl As AutoSizeModes
| Type | Default | Description |
|---|---|---|
| AutoSizeModes | UseMinSizeAndGrow |
A value that specifies how the embedded LayoutControl adjusts its dimensions.
|
Available values:
| Name | Description |
|---|---|
| ResizeToMinSize |
Forces the embedded LayoutControl to use its minimum size. The LayoutControl does not expand beyond this size.
| | UseMinSizeAndGrow |
The embedded LayoutControl’s minimum size is restricted; while its maximum size is unlimited.
| | UseMinAndMaxSize |
Allows the embedded LayoutControl to resize between specified minimum and maximum bounds.
|
You can access this nested property as listed below:
| Object Type | Path to AutoSizeInLayoutControl |
|---|---|
| LayoutControl |
.OptionsView .AutoSizeInLayoutControl
|
In UseMinSizeAndGrow mode, the embedded LayoutControl uses a minimum size specified by layout constraints of its child elements. The root group’s MinSize property returns this value. The LayoutControl can grow beyond this size without limit.
In ResizeToMinSize mode, the embedded LayoutControl maintains a fixed size equal to the root group’s MinSize.
In UseMinAndMaxSize mode, the embedded control can resize within the range specified by LayoutGroup.MinSize and LayoutGroup.MaxSize properties.
The maximum width of the embedded LayoutControl matches the widest maximum width of any item row. The same rule applies to height and column sizes.
Most UI controls do not enforce a maximum size, which allows the LayoutControl to occupy the entire available width. If an item row contains only controls with constrained maximum sizes, the LayoutControl shrinks to fit the smallest maximum size among them.
For example, LabelControl enforces a fixed width by default. If it is the only item in a row and its AutoSizeMode property remains unset or set to the default mode, the entire LayoutControl may shrink to match its width. To avoid this behavior, do one of the following
EmptySpaceItem)LabelAutoSizeMode.Vertical or LabelAutoSizeMode.None.See Also