public override void DrawCloseButton(CloseButtonRendererEventArgs args) { Rectangle rect = args.Bounds; rect.Inflate(-4, -4); if (args.IsDown) { args.Graphics.FillRectangle(ColorTable.DownKeysBrush, args.Bounds); using (Pen p = new Pen(ColorTable.DownTextBrush, 4)) { args.Graphics.DrawLine(p, rect.Left, rect.Top, rect.Right, rect.Bottom); args.Graphics.DrawLine(p, rect.Left, rect.Bottom, rect.Right, rect.Top); } } else { //args.Graphics.FillRectangle(ColorTable.KeysBrush, args.Bounds); using (Pen p = new Pen(ColorTable.TextBrush, 4)) { args.Graphics.DrawLine(p, rect.Left, rect.Top, rect.Right, rect.Bottom); args.Graphics.DrawLine(p, rect.Left, rect.Bottom, rect.Right, rect.Top); } } }
public abstract void DrawCloseButton(CloseButtonRendererEventArgs args);