ComponentFactory.Krypton.Toolkit.PaletteProfessionalSystem.CreateDropDownImage C# (CSharp) Method

CreateDropDownImage() private method

private CreateDropDownImage ( Color color ) : Image
color Color
return Image
        private Image CreateDropDownImage(Color color)
        {
            // Create image that has an alpha channel
            Image image = new Bitmap(9, 9, PixelFormat.Format32bppArgb);

            // Use a graphics instance for drawing the image
            using (Graphics g = Graphics.FromImage(image))
            {
                // Draw a solid arrow
                using (SolidBrush fill = new SolidBrush(color))
                    g.FillPolygon(fill, new Point[] { new Point(2, 3), new Point(4, 6), new Point(7, 3)});

                // Draw semi-transparent outline around the arrow
                using(Pen outline = new Pen(Color.FromArgb(128, color)))
                    g.DrawLines(outline, new Point[]{ new Point(1, 3), new Point(4,6), new Point(7, 3)});
            }

            return image;
        }
PaletteProfessionalSystem