Hao
Hao

Reputation: 8115

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

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.

Upvotes: 55

Views: 12938

Answers (3)

Frank
Frank

Reputation: 39

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

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

}

Upvotes: 1

Paul Stovell
Paul Stovell

Reputation: 32715

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

Upvotes: 73

Chris Hynes
Chris Hynes

Reputation: 10239

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.

Upvotes: 12

Related Questions