System.Windows.Forms.AutoSizeMode Enumeration

Specifies how a control will behave when its Control.AutoSize property is enabled.

Syntax

public enum AutoSizeMode

Remarks

Setting the AutoSizeMode.GrowAndShrink value produces the same behavior that you get for controls with the Control.AutoSize property enabled but which have no

AutoSizeMode property. The Control.MinimumSize and Control.MaximumSize properties are respected, but the current value of the Control.Size property is ignored.

Members

Member NameDescription
GrowAndShrink

The control grows or shrinks to fit its contents. The control cannot be resized manually.

GrowOnly

The control grows as much as necessary to fit its contents but does not shrink smaller than the value of its Control.Size property. The form can be resized, but cannot be made so small that any of its contained controls are hidden.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0