Esempio n. 1
0
 public void SetLightness(double lightness)
 {
     m_selectedColor.Lightness = lightness;
     Invalidate(UIColorUtil.Rect(ColorSelectorRectangle));
     SelectedColorChanged?.Invoke(this, null);
     Refresh();//Invalidate(UIColorUtil.Rect(ColorSelectorRectangle));
 }
Esempio n. 2
0
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            DrawColorBar(e.Graphics);

            if (Focused)
            {
                RectangleF lr = ClientRectangleF;
                lr.Inflate(-2, -2);
                ControlPaint.DrawFocusRectangle(e.Graphics, UIColorUtil.Rect(lr));
            }
        }