title: Design View Blank for Windows Form in Visual Studio 2017
body: <p>I have created a new Windows Form project in Visual Studio 2017.</p>
  
  <p>I opened up the code editor for Form1.cs by right-clicking Form1.cs in the Solution Explorer and then clicking view code.</p>
  
  <p>I then added in some code of my own so that Form1 is now as below:</p>
  
  <pre><code>public partial class Form1 : Form
      {
          Button button1;
          Button button2;
  
          public Form1()
          {
              InitializeComponent();
  
              Size = new Size(700, 500);
              FormBorderStyle = FormBorderStyle.FixedDialog;
  
              button1 = new Button();
              button1.Size = new Size(60, 40);
              button1.Location = new Point(30, 30);
              button1.Text = "Button 1";
              this.Controls.Add(button1);
  
              button2 = new Button();
              button2.Size = new Size(60, 40);
              button2.Location = new Point(100, 30);
              button2.Text = "Button 2";
              this.Controls.Add(button2);
  
              button1.Click += new EventHandler(AnyButton_Click);
              button2.Click += new EventHandler(AnyButton_Click);
          }
  
          private void AnyButton_Click(object sender, EventArgs e)
          {
              MessageBox.Show("You clicked a button!");
          }
      }
  </code></pre>
  
  <p>When I run the project, Form1 is drawn exactly as expected and the button click events work fine.</p>
  
  <p>However, the designer view (Form1.cs[Design]) is showing me a blank form.
  Does anyone know how to fix this problem so that I can add my own code but it will be reflected in the design view?</p>