title: How to add an extended control to the toolbox, when the control is in the same project?
body: <p>I have extended <code>DataGridView</code>. I want to add the new control to the toolbox without adding a reference to a different assembly (using the right-click option "Choose Items"). The control is in the same project of the form, and I do not want to separate them. How can I achieve this?</p>
  
  <p>Thanks.</p>
  
  <p><strong>Edit:</strong> This could not possibly a duplicate of a question about user controls if it's not a user control.</p>
  
  <p><strong>Edit 2:</strong> The code itself (it's a work in process. It's not finished):</p>
  
  <pre><code>class BindedDataGrid&lt;T&gt; : DataGridView
  {
      public BindedDataGrid()
      {
          InitializeComponent();
  
          IEnumerable&lt;PropertyInfo&gt; properties = typeof(T).GetProperties().Where(p =&gt; Attribute.IsDefined(p, typeof(BindingValueAttribute)));
  
          foreach (PropertyInfo property in properties)
          {
              var column = new DataGridViewColumn()
              {
                  HeaderText = ((property.GetCustomAttributes(true)[0]) as BindingValueAttribute).Value
              };
  
              Columns.Add(column);
          }
      }
  }
  </code></pre>