Skip to main content

DevExpress v25.1 Update — Your Feedback Matters

Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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
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.

#Property Paths

You can access this nested property as listed below:

Object Type Path to AutoSizeInLayoutControl
LayoutControl
.OptionsView .AutoSizeInLayoutControl

#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 or LabelAutoSizeMode.None.
See Also