Поделиться через


How to: Align Multiple Controls on Windows Forms

To standardize the layout of the user interface (UI) of your Windows-based application, you can position groups of controls with a single command.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Working with Settings.

To align multiple controls on a form

  1. Open the form containing the controls you want to position in the Windows Forms Designer.

  2. Select the controls you want to align so that the first control you select is the primary control to which the others should be aligned.

  3. On the Format menu, point to Align, and then click one of the seven choices available.

See Also

Tasks

How to: Add Controls to Windows Forms

Walkthrough: Arranging Controls on Windows Forms Using Snaplines

Walkthrough: Arranging Controls on Windows Forms Using a TableLayoutPanel

Walkthrough: Arranging Controls on Windows Forms Using a FlowLayoutPanel

How to: Reassign Existing Controls to a Different Parent

Reference

Windows Forms Controls by Function

Other Resources

Windows Forms Controls

Arranging Controls on Windows Forms

Controls to Use on Windows Forms