Saturday 3 July 2010

Visual Studio: Turn off snap lines

Snap lines were introduced with Visual Studio 2005. They are used to faciliate the positioning of elements on Windows Forms. But, snap lines can be disabled if you prefer the snap to grid layout style of Visual Studio 2003.
[edit]
Change Visual Studio Options

The grid layout settings are found on the Visual Studio 2005 Options dialog box. To access the Options dialog box, select the Tools / Options… menus. It is the same in the Visual Studio Express Editions.
[edit]
Check Show all settings

If you do not see the Windows Forms Designer item in the left panel of the Options dialog box—only Environment, Text Editor, and Debugging are viewable—, look for the Show all settings checkbox at the bottom left of the Options dialog. Check it to make the other settings viewable.
[edit]
Select SnapToGrid

* Now, in the left panel, expand the Windows Forms Designer by clicking on the plus (+) sign to expose the General item. Click the General item to display the general options in the right panel.

* If necessary, expand the Layout Settings item by by clicking on the plus (+) sign next to it.

* Select LayoutMode. Then, from the pull down menu, select SnapToGrid. And, click the OK button.

* Finally, exit Visual Studio and restart it for the change to take effect.



Figure: Visual Studio Layout Settings

No comments:

Post a Comment