Preview Tab in Visual Studio 2011 Developer Preview

Preview Tab features is a very nice and interesting addition in Visual Studio 2011 Developer Preview. In Visual Studio 2011 Developer preview, instead of document opened directly, it’s open in special tab called Preview Tab. The document opened in Preview Tab will come to normal view only when we are promoting the document. This actually helps to reduce the number of open documents with in Visual Studio Editor, especially during debugging and when we are looking some files from solution explorer.

In prior version of Visual studio, during development we moves around different files in solution explorer to check out the code or any other information and in the end it turns out like “N” number of files opened in Visual Studio as shown in below picture.

image

Now, this is a bit confusing job to find out the actual file to work. Hence, the only option left out is “Close All But This” , which eventually close all the files apart from the selected one and in the end we close the selected file as well and then open only require file from solution explorer. The same thing we faced during debugging of application as well (number of files got opened for breakpoints in different files and step-in)

image

In Visual Studio 2011 Developer Preview, Preview Tab reduce the number of open files in Visual Studio. Developer can focus only on the required files instead of focusing all unnecessary files. New Solution Explorer now supports Single Click to open files. Once you click on the files, instead of directly open in editor tab, it will open in special preview tab as shown in below picture.

image

If you want to view or check other files, visual studio will replace the Preview Tab files automatically with new one. So, in the end you will have only open file open. The same thing will apply during debugging of application , preview tab will only show current breakpoint or step in file instead opening all other files separately.  Now, at any point of time if you feel, the current preview tab file need some work and you want keep it with you for future, just click on “Promote” button.

image

This will automatically  promote the document as regular document with normal view.

image

 

For any additional setting navigate to Tools > Options > Environment > Tabs and Windows . You can use the Quick Launch features to open the same window.

image

Hope this helps !

Cheers !

Abhijit

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.