title: How to override Control.Enabled property in C# Winforms?
body: <p>I have a custom control I am working on. I want to change its color when it is enabled or disabled. So I wrote a code inside <code>OnEnabledChanged</code>.</p>
  
  <pre><code>        protected override void OnEnabledChanged(EventArgs e)
          {
              if (!Enabled)
              {
                  temp1 = colorOn;
                  temp2 = colorOff;
                  colorOff = colorOn = Color.LightGray;
              }
              else
              {
                  colorOn = temp1;
                  colorOff = temp2;
              }
              Invalidate();
              base.OnEnabledChanged(e);
          }
  </code></pre>
  
  <p>This code works fine in runtime but not design time. It wasn't raised when I changed the <code>Enabled</code> property in design time. So I want to override the <code>Enabled</code> property of the control. But it doesn't show up when typing it. </p>
  
  <p>So how can I override it? If there is another way I want to use it.</p>