/// <summary> /// Draw a preview of the <see cref="GradientColor"/> /// </summary> /// <param name="e">The paint event args providing the <see cref="Graphics"/> and bounding /// rectangle</param> public override void PaintValue(PaintValueEventArgs e) { GradientColor gradientColor = (GradientColor)e.Value; using (LinearGradientBrush b = gradientColor.GetBrush(e.Bounds, LinearGradientMode.Horizontal)) { e.Graphics.FillRectangle(b, e.Bounds); } }