Skip to main content

LayoutControl.AutoSizeMode Property

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

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v24.1.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