How to stop Visual Studio from opening a file on single click?

Visual Studio

Visual Studio Problem Overview


In my Visual Studio 2012 Solution Explorer, when I single click a filename it opens it. This was different from Visual Studio 2010 (required a double click). Is there a way to make double-click the 'view file' command?

Visual Studio Solutions


Solution 1 - Visual Studio

This is called the Preview Tab feature. To change that behavior, go to:

Tools -> Options -> Environment -> Tabs and Windows

Then look for the "Preview Tab" section, and uncheck the options therein:

Options Window > Environment option > Tabs and Windows sub-option > Preview Tab section

Solution 2 - Visual Studio

Option 1: Using icon in Solution Explorer

You can enable or disable the feature in Solution Explorer using the "Preview Selected Items" button.

Enter image description here

The icon is a Tab aligned to the right.

Option 2: Using the Options window

You can enable or disable the feature by going into Tools > Options and then Environment > Tabs and Windows.

enter image description here

Solution 3 - Visual Studio

The Single-click opens files in the preview tab text mentioned in rubber boots' answer is missing in VS 2015. Mysteriously, a search for "single click" still brings up the Environment > Tabs and Windows option.

So for VS2015 and VS2017, either click the button in Vinicius's answer, or uncheck the Preview selected files in Solution Explorer box shown in the screenshot below.

enter image description here

Solution 4 - Visual Studio

In Visual studio 12/13, easiest way is to type "single click" in quick search and than select Tabs and Windows.

And in Tabs and Windows dialogue ,uncheck "Preview selected files in solutions explorer"

enter image description here

Solution 5 - Visual Studio

Shortcut Ctrl+Alt+Home.

If you press that in a document that was just opened, it will be opened permanently.

Item -> right click -> Open With -> Source Code (Text) Editor -> press Set as Default button

Solution 6 - Visual Studio

It's no longer there in VS2019. You enable/disable it through "preview selected Items" in Solution Explorer.

single click to preview source Visual Studio 2019 editor settings

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJohn LivermoreView Question on Stackoverflow
Solution 1 - Visual Studiorubber bootsView Answer on Stackoverflow
Solution 2 - Visual StudioVinicius RochaView Answer on Stackoverflow
Solution 3 - Visual StudioChristopher SchneiderView Answer on Stackoverflow
Solution 4 - Visual StudioAnwar Ul-HaqView Answer on Stackoverflow
Solution 5 - Visual StudioJosip IvicView Answer on Stackoverflow
Solution 6 - Visual StudiouseromView Answer on Stackoverflow