Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: Make view code default

Is there any way to make Visual Studio show the code of a control / form by default instead of the designer? I tend not to be a fan of the designers as they add bloat.

like image 324
smack0007 Avatar asked Oct 16 '22 12:10

smack0007


Video Answer


2 Answers

Right-click on a file and select "Open With..."

Select "CSharp Editor" and then click "Set as Default".

like image 267
Jon Skeet Avatar answered Oct 18 '22 01:10

Jon Skeet


Decorate your class with [System.ComponentModel.DesignerCategory("")], e.g.:

[System.ComponentModel.DesignerCategory("")]
public class MySpecialButton : System.Windows.Forms.Button
{
}
like image 13
gmb Avatar answered Oct 18 '22 01:10

gmb