System.Windows.Forms.AutoSizeMode Enumeration

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


public enum AutoSizeMode


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.


Member NameDescription

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


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.


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