/// <summary> /// Initializes a new instance of the <see cref="ColorSlider"/> class. /// </summary> /// <param name="min">The minimum value.</param> /// <param name="max">The maximum value.</param> /// <param name="value">The current value.</param> public ColorSlider(int min, int max, int value) { InitializeComponent(); Renderer = new DefaultSliderRenderer(this); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.Selectable | ControlStyles.SupportsTransparentBackColor | ControlStyles.UserMouse | ControlStyles.UserPaint, true); BackColor = Color.Transparent; Minimum = min; Maximum = max; Value = value; SetThumbRect(); }