How can I set the default double click action in Visual Studio?

Visual StudioDefaultview

Visual Studio Problem Overview


How can I make Visual Studio default to View Source when you double-click the Form1.cs. I prefer to make View Source the default of double-click than View Designer.

Visual Studio Solutions


Solution 1 - Visual Studio

Right click the file in the Solution Explorer, choose "Open With...", select the CSharp Editor, and click the "Set as Default" button.

Solution 2 - Visual Studio

Right click a form file and click "Open With...". Pick your desired designer to open as default (in this case "CSharp Editor" or "Microsoft Visual Basic Editor") and click "Set as Default". Voila.

Solution 3 - Visual Studio

with this attribute myClass will open in the code editor and not the designer:

[System.ComponentModel.DesignerCategory("")]
public class myClass : Form
{
 
}

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
QuestionHaoView Question on Stackoverflow
Solution 1 - Visual StudioPaul StovellView Answer on Stackoverflow
Solution 2 - Visual StudioChris HynesView Answer on Stackoverflow
Solution 3 - Visual StudioFrankView Answer on Stackoverflow