Using Alignment Hairs to Position Controls on Forms
Alignment hairs assist you in positioning your controls on a form, by drawing a window margin on your form and displaying alignment hairs when you move or resize controls by dragging them with the mouse.
The window margin is not displayed for a Web form.
You can toggle the display of alignment hairs, as required.
To toggle the display of alignment hairs on your form
-
Select the Show Alignment Hairs command from the Options menu.
-
Click the Alignment Hairs toolbar button.
When the display of alignment hairs is selected, a check mark is displayed to the left of the command in the Options menu and alignment hairs (lines) are then applied to your form. (To change the option back again and hide the display of alignment hairs on your forms, repeat the action. The check mark is then no longer displayed in the Options menu.)
The window margin provided by the alignment hairs contains your controls so that you can maintain a standard margin between the controls and the border of the form.
The margin is drawn in the current grid color, and is for guidance only. It is not drawn on your runtime form.
If you have selected the grid display, the alignment border is not displayed but the grid is drawn only up to an imaginary alignment border so that the bounds of the border are apparent from the extent of the grid.
Alignment hairs enable you to quickly and accurately align your controls when you move controls by dragging them with the mouse.
The hairs extend the width and height of the form, and align with the sides of the master control, as shown in the following image.
Another set of hairs is displayed parallel to the first set, but offset by the standard control spacing. This enables you to maintain a standard gap between your controls.
When alignment hairs are displayed and you drag a sizing handle, alignment hairs are drawn only on the side of the control on which the sizing handle is being dragged. An example of alignment hairs positioned beside a dragged sizing handle is shown in the following image.
If you resize a control that can have children, an extra alignment hair is displayed inside that control. This enables you to resize the parent while maintaining the recommended space between a child and its parent border.