-3

I am making a soundboard and I accidentally closed the design view tab for it.

  1. I pressed shift + f7 - nothing happened.
  2. I right clicked on forum1.cs in Solution Explorer and Design View wasn't there.
  3. I clicked on view at the top left corner of Visual Studios and Design View wasn't there.

How can I get design view back? (I'm also new to c#)

bob digby
  • 37
  • 6
  • you can use Window menu > Reset window layout to reset back to default – mpakbaz Nov 18 '18 at 22:31
  • Winforms? ASP.Net? Whats the error? Can you attach a screenshot? – Jeremy Thompson Nov 18 '18 at 22:32
  • @mpakbaz - thank you for the help but it didn't work :( – bob digby Nov 18 '18 at 22:39
  • @Jeremy Tompson - There is no error its just all the ways of getting designer view open are not working. – bob digby Nov 18 '18 at 22:39
  • 1
    Just restore the project from source control. Not using it? Some things have to be learned in the school of hard knocks, important lesson today. – Hans Passant Nov 18 '18 at 23:19
  • Like you, mine disappeared one day. Very frustrating. I did "localize" it to one particular Winforms project. None of the form files offered "View Designer." I was able to restore it by getting a backup copy of just two files: .vbproj & .vbproj.user. Once these were restored the forms designer was available. I haven't investigated the changes from the bad ones to the good ones - which I, of course, will need to do - but this certainly tells me where the problem arose. I suspect it was a bad shutdown from a Windows update... – Destek Jul 24 '23 at 19:21

3 Answers3

0

First class in namespace must inherit from Form.

Example of working code:

namespace Test
{
    public partial class Form1 : Form
    {
         Debug.WriteLine("Hello World!")
    }
    class your_class
    {

    }
}

Example of "not" working code:

Namespace Test
{
    class your_class
    {

    }
    public partial class Form1 : Form
    {
         Debug.WriteLine("Hello World!")
    }
}
0

Hi I tried solution from this link (https://stackoverflow.com/a/59750247/3828925) which seems to work for me finally after trying a lot of different things. Basically you click on the "Switch between solutions and available views" once which shows just the solution and then click again. It takes a few seconds but then I was able to see my forms.

enter image description here

DK2014
  • 171
  • 3
  • 20
-2

have you checked under Tools>Options then scroll to XAML Designer and make sure the "Enable XAML Designer (requires restart of Visual Studio)" checkbox is clicked on? This is for Visual Studio 2017

fradsham
  • 131
  • 2
  • 6
  • Have you scanned these other possible attempts: https://stackoverflow.com/questions/30090719/xaml-designer-not-showing-up – fradsham Nov 18 '18 at 23:02
  • He lost the design view for "forum1.cs". Contributing at SO often requires reading past the typing mistakes to get the right answer. – Hans Passant Nov 18 '18 at 23:19