'Designer View Disappeared (Visual Studios C#)

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#)



Solution 1:[1]

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!")
    }
}

Solution 2:[2]

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

Solution 3:[3]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mikoraj
Solution 2 DK2014
Solution 3 fradsham