.NET Tips and Tricks

Blog archive

Controlling Your Visual Studio Default Window Layout

Starting about a week ago, whenever I opened a solution in Visual Studio, Solution Explorer did not appear. Instead, the right-hand side of the Visual Studio window was completely occupied -- top to bottom -- by the Properties window. I have no idea why this happened. I like the Properties window as much as the next developer, but I want it stacked below Solution Explorer (What can I say? I'm a traditionalist). Not matter what configuration I left Visual Studio in, the next time I opened it, Solution Explorer was gone. The solution was to restore to my default layout.

If you have a window layout that you'd prefer to the one Visual Studio is giving you, you need to be proactive or, as in my case, you might some day lose it. It's easy to set your default layout: Arrange your windows the way you like, go to the Window menu in Visual Studio and pick Apply Window Layout > My Default.

If you want you can setup several window layouts by picking Window > Save Window Layout. This choice gives you the option of assigning a name to your layout. You can now switch between layouts either through a keyboard shortcut (Ctrl+Alt+ <a number>) or by going to Window > Apply Window Layout and picking the layout you want by name. Whichever way you go, you'll get an annoying dialog box asking you to confirm that you want to change layouts, but the dialog box has a "Don't show this again" option that you can check to make it go away forever.

Do remember that Visual Studio tries to remember the windows you last had opened or closed so it can restore to that layout for you. So, if you open and close windows, you won't necessarily see your default layout again until you pick it from the Apply Window Layout. As I said at the start, this is a a good reason to set up your "default" window layout right now: Having that default layout in place makes it easy to get back to it after you've played with Visual Studio's windows.

If you ever want to discard a layout or rename it, you can use the Window | Manage Window Layouts choice. If you want to get back to the "factory settings," pick Window | Reset Window Layout. Don't panic if you pick that choice -- it doesn't discard your settings so you can still return to your preferred layout.

Posted by Peter Vogel on 09/27/2018


comments powered by Disqus

Featured

Subscribe on YouTube