Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 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

LayoutControl.AutoSizeMode Property

Gets or sets how the control is resized when automatic resizing is enabled.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(true)]
[DefaultValue(AutoSizeMode.GrowAndShrink)]
[DXCategory("Layout")]
public AutoSizeMode AutoSizeMode { get; set; }

#Property Value

Type Default Description
AutoSizeMode GrowAndShrink

A value that specifies how the control is automatically resized.

#Remarks

When you enable the LayoutControl.AutoSize option, the LayoutControl‘s size is automatically calculated according to the AutoSizeMode setting.

If the AutoSizeMode property is set to GrowAndShrink (the default value), the control grows or shrinks to fit its contents. In this case, the control cannot be resized manually.

If the AutoSizeMode property is set to GrowOnly, the control grows as much as necessary to fit its contents, but does not shrink smaller than its Size property’s value. The control can also be resized manually, but its minimum size is limited by the minimum size of nested layout items.

To learn more, see the LayoutControl.AutoSize topic.

See Also