Visual Studio: Turn off snap lines
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| Visual Studio |
| edit |
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.
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.
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.
Select SnapToGrid
- Now, in the left panel, expand the
Windows Forms Designerby clicking on the plus (+) sign to expose theGeneralitem. Click theGeneralitem to display the general options in the right panel.
- If necessary, expand the
Layout Settingsitem by by clicking on the plus (+) sign next to it.
- Select
LayoutMode. Then, from the pull down menu, selectSnapToGrid. And, click theOKbutton.
- Finally, exit Visual Studio and restart it for the change to take effect.
![]()
Figure: Visual Studio Layout Settings