dotnetmonitor.com

 
Index
Previous
Next

 

If you set AutoSize = true for a form, the default setting for AutoSizeMode is GrowOnly. This means an AutoSized dialog in this mode cannot snap back down to a smaller size. Typically this is not what you want. If you want a resizable dialog that can stop at the PreferredSize, use the MinimumSize property.

 

this.MinimumSize = this.PreferredSize

 

Alternately, if you do not want the dialog to be resizable, switch AutoSizeMode to GrowAndShrink.

Terms
Docking Anchor Layout
What happens when I have Dock and Anchors that conflict?
Dock Scenarios
Padding Margin
You have a perf problem with Layout - how to diagnose?