Control Alignment

You may have found laying controls out on a complex form to be a time-consuming process. Several new features in the Windows Forms designer make aligning controls in the designer much less of a chore in Visual Studio 2005. Now when you drag a control, such as a button, a set of sticky vertical and horizontal alignment lines appears that visually shows you how your button is aligned with its neighboring controls. You can use snap lines instead of the Layout toolbar to more quickly align your controls vertically and horizontally. Controls can be aligned with text flexibly using either top-edge, text baseline, and bottom-edge snap lines. The designer also helps you space your controls correctly on the page with its new padding and margin properties. Finally, for elaborate layout scenarios with resizable dialogs or large numbers of controls, two new panel-like controls provide you with an advanced layout engine. TableLayoutPanel allows you to define rows and columns that can be configured to size automatically in various ways, and FlowLayoutPanel enables you to create forms and controls that resize the way HTML Web pages do.

Use snap lines to easily align controls on the page vertically and horizontally

New margin and padding features help you get the spacing right