title: WindowsForms designer and GenericForm
body: <p>Why doesn't the designer work if you inherit from an own written genericform?</p>
  
  <p>Suppose I've got the following genericform</p>
  
  <pre><code>public class GenericForm&lt;T&gt; : System.Windows.Forms.Form
  {
      public T Test
      {
          get;
          set;
      }
  }
  </code></pre>
  
  <p>When I go to the designer I get errors.</p>
  
  <p>The only workaround I made up is using compiler directives.</p>
  
  <pre><code>#if DESIGN    
      public partial class Form1 : System.Windows.Forms.Form
  #else
      public partial class Form1 : GenericForm&lt;string&gt;
  #endif
  
      {
          public Form1()
          {
              InitializeComponent();
          }
      }
  </code></pre>