/// <summary> /// Draws the dark blue border of the XpButton object. /// </summary> /// <param name="g">The System.Drawing.Graphics object to be used to paint the border.</param> private void DrawBorder(Graphics g) { Pen penBorder = new Pen(clrBorder); MyControlPaint.DrawRoundedRectangle(g, penBorder, this.BorderRectangle, sizeBorderPixelIndent); penBorder.Dispose(); }
/// <summary> /// Draws the disabled state of the XpButton. /// </summary> /// <param name="g">The System.Drawing.Graphics object to be used to paint the XpButton.</param> private void OnDrawDisabled(Graphics g) { Rectangle rcBorder = this.BorderRectangle; // // Background // Rectangle rcBackground = new Rectangle( rcBorder.X + 1, rcBorder.Y + 1, rcBorder.Width - 1, rcBorder.Height - 1); SolidBrush brushBackground = new SolidBrush(Color.FromArgb(245, 244, 234)); g.FillRectangle(brushBackground, rcBackground); brushBackground.Dispose(); // // Border // Pen penBorder = new Pen(Color.FromArgb(201, 199, 186)); MyControlPaint.DrawRoundedRectangle(g, penBorder, rcBorder, sizeBorderPixelIndent); penBorder.Dispose(); }