title: control is not refresh when custom type property is changed
body: <p>I made a custom type for gradient colors. I have no problem at design time, but when one of the properties of the custom type is changed at run time, the control has no react on the changes. here is the source code:</p>
  
  <p>------------ Custom Type----------------</p>
  
  <pre><code>[Serializable]
  [TypeConverter(typeof(GradientFillConverter))]
  public class GradientFill 
  {
      private Color startColor = Color.FromKnownColor(KnownColor.Blue);
      private Color endColor = Color.FromKnownColor(KnownColor.White);
      private int angle = 30;
  
      public GradientFill()
      {
      }
  
      public GradientFill(Color startColor, Color endColor, int angle)
      {
          this.startColor = startColor;
          this.endColor = endColor;
          this.angle = angle;
      }
  
      [NotifyParentProperty(true)]
      [RefreshProperties(RefreshProperties.All)]
      public Color StartColor
      {
          get { return this.startColor; }
          set { this.startColor = value; }
      }
  
      [NotifyParentProperty(true)]
      [RefreshProperties(RefreshProperties.All)]
      public Color EndColor 
      {
          get { return this.endColor; }
          set { this.endColor = value; }
      }
  
      [NotifyParentProperty(true)]
      [RefreshProperties(RefreshProperties.All)]
      public int Angle
      {
          get { return this.angle; }
          set { this.angle = value; }
      }
  
      public static bool operator ==(GradientFill gf1, GradientFill gf2)
      {
  // some code...
      }
  
      public static bool operator !=(GradientFill gf1, GradientFill gf2)
      {
  // some code...
      }
  
      public bool CompareValues(object objectToCompare)
      {
  // some code...
      }
  
      public override bool Equals(object obj)
      {
  // some code...
      }
  
      public override int GetHashCode()
      {
  // some code...
      }
  }
  </code></pre>
  
  <p>------------------Type Converter----------------------</p>
  
  <pre><code>public class GradientFillConverter : ExpandableObjectConverter
  {
      public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
      {
          if (destinationType == typeof(string) ||
              destinationType == typeof(InstanceDescriptor))
              return true;
  
          return base.CanConvertTo(context, destinationType);
      }
  
      public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
      {
          if (value != null &amp;&amp; value is GradientFill)
          {
              GradientFill gradientFill = (GradientFill)value;
  
              if (destinationType == typeof(string))
              {
      // returns a string
              }
  
              if (destinationType == typeof(InstanceDescriptor))
              {
      // returns an Instance Descriptor
              }
          }
  
          return base.ConvertTo(context, culture, value, destinationType);
      }
  
      public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
      {
          if (sourceType == typeof(string))
              return true;
  
          return base.CanConvertFrom(context, sourceType);
      }
  
      public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
      {
          if (value != null)
          {
              if (value is string)
              {
      // returns a GradientFill Object
              }
          }
  
          return base.ConvertFrom(context, culture, value);
      }
  
      public override bool GetCreateInstanceSupported(ITypeDescriptorContext context)
      {
          return true;
      }
  
      public override object CreateInstance(ITypeDescriptorContext context, System.Collections.IDictionary propertyValues)
      {
      // returns a GradientFill Object
      }
  }
  </code></pre>
  
  <p>I defined a property in my custom control like this:</p>
  
  <p>---------Definition------------</p>
  
  <pre><code>[Serializable]
  public partial class MyControl : Control
  {
  ...
      private GradientFill backgroundGradient = new GradientFill(Color.FromKnownColor(KnownColor.Blue), Color.FromKnownColor(KnownColor.White), 90);
      public GradientFill BackgroundGradient
      {
          get
          {
              return this.backgroundGradient;
          }
  
          set
          {
              if (!this.backgroundGradient.CompareValues(value))
              {
                  this.backgroundGradient = value;
                  this.Repaint(); //Actually invalidates the control.
              }
          }
      }
  ...
  }
  </code></pre>
  
  <p>Any help would be highly appreciated as it took lots of my time.</p>
  
  <p>Thank you</p>