title: How to add a custom property to a UserControl which display as a combo box at the design time
body: <p><strong>Edit:</strong>
  The question is about adding a property <strong>during the design time</strong>, not <strong>during the runtime</strong>.</p>
  
  <p>I created a UserControl, in which contains a button, and I want to add a new property that when user uses it in form, he could see the property <code>FillColor</code> in user control's <code>Property Tab</code>. What's more, that property should be in the form of a combobox, which allows user to select the <code>Color</code> in System.Drawing.Color.</p>
  
  <p>For Example:</p>
  
  <p>I call my UserControl <code>HalfFill</code>. What it does is to fill a normal button from start to the half of he size.</p>
  
  <p>Now I want 2 properties to be customized using <code>Property Tab</code>:</p>
  
  <ul>
  <li>the first half color</li>
  <li>the second half color</li>
  </ul>
  
  <p>And when user chooses the color , the choices are listed in combobox (behaves like <code>BackColor</code> property for normal buttons), and all of them come from System.Drawing.Color.</p>
  
  <p>I want to do it with Enum. Can someone help me? How i put the comboxBox with its values into the <code>Properties Tab</code>?</p>
  
  <p>Here is an example that I am looking for</p>
  
  <pre><code>public partial class HalfButton: UserControl
  {
      public ComboBox ChooseColor //of all color in System.Drawing.Color
      {
          /* must be in that comboBox all the color in Color library so the user could choose 
          from properies of the button the color he want */
  
          get { return x.Item[colorfill.ToString()); }
          set { colorfill = Color.FromName(value); OnPaint(null); }
      }
  
      private Color colorfill = Color.Tomato;
  
      ComboBox x;
  
      public HalfButton()
      {
          InitializeComponent();
  
          x = new ComboBox();
          ArrayList ColorList = new ArrayList();
          Type colorType = typeof(System.Drawing.Color);
          PropertyInfo[] propInfoList = colorType.GetProperties(BindingFlags.Static |
                                                                BindingFlags.DeclaredOnly |
                                                                BindingFlags.Public);
          foreach (PropertyInfo c in propInfoList)
          {
              x.Items.Add(c.Name);
          }
      }
  
      protected override void OnPaint(PaintEventArgs e)
      {
          MessageBox.Show(colorfill+""); 
      }
  }
  </code></pre>