title: Controls not created programatically using PerformClick event
body: <p>I'm using <code>Windows Forms</code>, I create button programmatically as:</p>
  
  <pre><code>var button = new Button
  {
      Name = "btnJob",
      Text = "test",
  };
  
  button.FlatAppearance.BorderSize = 0;
  button.Click += OnProjectButtonClick;
  </code></pre>
  
  <p>As you can see I use <code>Click</code> event, so in my Click event I create another controls inside a panel like:</p>
  
  <pre><code>private void OnProjectButtonClick(object sender, EventArgs e)
  {
      NewContactPanel = new TableLayoutPanel
      {
          AutoSize = true,
          Visible = false
      };
  
      var lblContactType = new Label
      {
          Name = "lblContactType",
          Text = "Type",
          AutoSize = true,
          Margin = new Padding(15, 10, 0, 0),
      };
  
      NewContactPanel.Controls.Add(lblContactType, 0, 0);
  
      CboContactType = new ComboBox
      {
          Name = "cboContactType",
          Width = 130,
          Margin = new Padding(3, 7, 0, 0),
          DropDownStyle = ComboBoxStyle.DropDownList,
      };
  
      NewContactPanel.Controls.Add(CboContactType, 1, 0);
  
      var lblNewContactName = new Label
      {
          Name = "lblNewContactName",
          Text = "Name *",
          AutoSize = true,
          Margin = new Padding(15, 10, 0, 0),
      };
  
      NewContactPanel.Controls.Add(lblNewContactName, 2, 0);
  }
  </code></pre>
  
  <p>It works correctly without problems, but now I want to execute this click event programmatically so I do something like:</p>
  
  <pre><code>var firstPanel = tlpJobs.Controls.OfType&lt;TableLayoutPanel&gt;().FirstOrDefault();
  var firstButton = firstPanel.Controls.OfType&lt;Button&gt;().FirstOrDefault();
  firstButton.PerformClick();
  </code></pre>
  
  <p>So I used <code>PreformClick();</code> event. When I debug, it fire event correctly, the button is clicked correctly too, but controls are not created in my panel. What am I doing wrong? if I click with a mouse at the same button panel is created correctly!, why is not working with PerformClick();? Any ideas?</p>