Пример #1
0
        public ColorDropDownItem(string value, Brush brush)
        {
            Value = value;

            Image = new Bitmap(16, 16);
            Graphics g = Graphics.FromImage(Image);

            Pen boarderColor = Pens.White;
            if (brush.ConvertBrushToString() == "White")
                boarderColor = Pens.Black;

            g.DrawRectangle(boarderColor, 0, 0, Image.Width, Image.Height);
            g.FillRectangle(brush, 1, 1, Image.Width - 1, Image.Height - 1);
        }