SETTING DESIGNER OPTIONS
When you first install Visual Studio, the Windows Forms Designer is configured to be quite usable. You can open a form immediately and use the Toolbox to place controls on it. You can use the mouse to move and resize controls. You can use the Format menu to arrange and size controls. Overall the Windows Forms Designer provides a first-class intuitive WYSIWYG (“what you see is what you get”) experience.
Behind the scenes, however, there are a few configuration options that control the designer’s behavior and that you should know about to get the most out of the designer.
To view the designer’s options, open the Tools menu, select Options, open the Windows Forms Designer branch, and select the General page to display the dialog box shown in Figure 3-1.
FIGURE 3-1: This dialog box lets you control the Windows Forms Designer’s behavior.
The following list describes the most important of these settings:
- Optimized Code Generation — Determines whether Visual Studio generates optimized code. This setting is here instead of some more code-oriented part of the Options dialog box because some controls may be incompatible with code optimization.
- Grid Size — Determines the horizontal and vertical dimensions of the sizing grid for use when LayoutMode is SnapToGrid.
- LayoutMode — Determines whether Visual Studio uses snap-to-grid or snap lines. If this is SnapToGrid, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access