OptionsView.AutoSizeInLayoutControl Property
Gets or sets how the LayoutControl
adjusts its size when placed inside another LayoutControl.
Namespace: DevExpress.XtraLayout
Assembly: DevExpress.XtraLayout.v25.1.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
[DefaultValue(AutoSizeModes.UseMinSizeAndGrow)]
public AutoSizeModes AutoSizeInLayoutControl { get; set; }
#Property Value
Type | Default | Description |
---|---|---|
Auto |
Use |
A value that specifies how the embedded |
Available values:
Name | Description |
---|---|
Resize |
Forces the embedded |
Use |
The embedded Layout |
Use |
Allows the embedded |
#Property Paths
You can access this nested property as listed below:
Object Type | Path to Auto |
---|---|
Layout |
|
#Remarks
#UseMinSizeAndGrow
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.
#ResizeToMinSize
In ResizeToMinSize
mode, the embedded LayoutControl maintains a fixed size equal to the root group’s MinSize.
#UseMinAndMaxSize
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
- Add a non-constrained element to the same row (for example, an
EmptySpaceItem
) - Set the LabelControl.AutoSizeMode property to
LabelAutoSizeMode.Vertical
orLabelAutoSizeMode.None
.