private DrawBackground ( |
||
g | ||
Результат | void |
private void DrawBackground(Graphics g)
{
int width = this.ClientRectangle.Width;
int height = this.ClientRectangle.Height - this.DisplayRectangle.Height;
Color backColor = this.Enabled ? this._backColor : SystemColors.Control;
using (SolidBrush brush = new SolidBrush(backColor))
{
g.FillRectangle(brush, this.ClientRectangle);
}
Rectangle bgRect = new Rectangle(2, 2, this.Width - 2, this.ItemSize.Height);
this.DrawImage(g, this._titleBackground, bgRect);//绘制背景图
}