void DrawHeader(Graphics g, int index, Rectangle rc, Border3DStyle style)
{
string bandName = bands[index].Text;
using (Brush b = new SolidBrush(ColorUtil.VSNetControlColor))
{
g.FillRectangle(b, rc);
}
if (ColorUtil.UsingCustomColor)
{
if (style == Border3DStyle.RaisedInner)
{
using (var p = new Pen(ColorUtil.VSNetBorderColor))
g.DrawRectangle(p, rc.Left, rc.Top, rc.Width - 1, rc.Height - 1);
}
else
{
using (Brush fillColor = new SolidBrush(ColorUtil.VSNetSelectionColor))
g.FillRectangle(fillColor, rc);
using (var p = new Pen(ColorUtil.VSNetBorderColor))
g.DrawRectangle(p, rc.Left, rc.Top, rc.Width - 1, rc.Height - 1);
}
}
else
{
ControlPaint.DrawBorder3D(g, rc, style);
}
using (StringFormat stringFormat = new StringFormat())
{
stringFormat.LineAlignment = StringAlignment.Center;
stringFormat.Alignment = StringAlignment.Center;
g.DrawString(bandName, Font, SystemBrushes.WindowText, rc, stringFormat);
}
}