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?
-
1Projects are not opened in design view. _forms_ and such may be opened in design view. – John Saunders Jun 16 '13 at 21:38
8 Answers
You can double click directly on the .cs file representing your form in the Solution Explorer :
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.

- 8,993
- 6
- 40
- 55
-
5neither shift +f7 or f7 does anything... when i search test in the solution explorer it says "no results found". I have a few files here, should i be looking at the extension .design.vb, .vb, or .resx? – Madison Young Jun 16 '13 at 21:42
-
i clicked "save all" earlier. I just went through everything in that folder and eventually found something that linked back to the design tab. Thanks! – Madison Young Jun 16 '13 at 21:48
-
I have project in C++ and there is missing file with .cs extension. What can be a problem? I have only standard .cpp and .h files. I can't open MyForm.h in designer. – arrowman Mar 11 '17 at 11:33
-
-
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. :)

- 1,147
- 2
- 11
- 22
-
1In my case there were two classes declared before the form class, and it was preventing the design view from being displayed. – wilsotc Dec 19 '16 at 13:53
-
Click on the form in the Solution Explorer
Just Shift+f7 and Design view will open OR Right-click on your form file and Click on View Designer

- 1,230
- 14
- 17
I had this problem in Visual Studio 2019 today. When I right-clicked a form or user control in Solution Explorer, there was no "View Designer Shift-F7" option. The "View Code F7" option was there, but not the Shift-F7 option. I noticed that I could view and work on the design view for two forms, that I opened before the problem surfaced. But Visual Studio would not let me open more design views.
My solution is: In another project, in the same solution, I created a new Windows Form. Now the "View Designer Shift-F7" is visible and working for all forms and user controls, in all projects in my solution. I deleted the latest new form, and Design View still works. This solved the problem for me.

- 59
- 5
@Pierre's answer is not always applicable. When I messed up the files in the solution folder a bit (maybe add some code from outside which conflicts the GUI, I don't know precisely), then the Design View does not show up. In fact, my "Solution Explorer" is actually "Solution Explorer - Folder View". There is no object hierachy shown in the Solution Explorer, but just a file & folder view.

- 109
- 1
- 6
If non of the above worked do this Tools-> Option-> XAML Designer -> Enable XAML designer Then you need to restart Visual sudio.

- 23
- 5