Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I open a Visual Studio project in design view?

I saved my project, but now I can't open it up in design view where you see all the buttons and stuff. Visual Studio 2012 Anyone know how?

like image 292
Madison Young Avatar asked Jun 16 '13 20:06

Madison Young


2 Answers

You can double click directly on the .cs file representing your form in the Solution Explorer :

Solution explorer with Design View circled

This will open Form1.cs [Design], which contains the drag&drop controls.

If you are directly in the code behind (The file named Form1.cs, without "[Design]"), you can press Shift + F7 (or only F7 depending on the project type) instead to open it.

From the design view, you can switch back to the Code Behind by pressing F7.

like image 197
Pierre-Luc Pineault Avatar answered Oct 06 '22 00:10

Pierre-Luc Pineault


My problem, it showed an error called "The class Form1 can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again. ". So I moved the Form class to the first one and it worked. :)

like image 26
Prasaathviki Avatar answered Oct 06 '22 00:10

Prasaathviki