title: Cannot add controls to panel in c# Windows Forms
body: <p>I am trying to add several controls like Labels, pictureboxes etc. to a Panel in c# Windows Forms. My code looks like this:</p>
  
  <pre><code>this.panel1.Controls.Add(this.label1);
  </code></pre>
  
  <p>Every time I put this in the panel1 section in my Designer.cs, it gets deleted after I switch between classes and forms. I am doing this so that I can "transform" the Panel into a Bitmap with all the other controls in it.</p>