/// ------------------------------------------------------------------------------------ /// <summary> /// Make it pretty behind the buttons. /// </summary> /// ------------------------------------------------------------------------------------ private void HandleButtonPanelPaint(object sender, PaintEventArgs e) { var rc = _buttonsFlowLayoutPanel.ClientRectangle; using (var br = new LinearGradientBrush(rc, ButtonPanelBackColor1, ButtonPanelBackColor2, 135)) { e.Graphics.FillRectangle(br, rc); } AppColors.PaintBorder(e.Graphics, ButtonPanelTopBorderColor, rc, BorderSides.Top); }
/// ------------------------------------------------------------------------------------ private void HandleHeaderPanelPaint(object sender, PaintEventArgs e) { var rc = _headerLabel.ClientRectangle; using (var br = new LinearGradientBrush(rc, HeaderPanelBackColor1, HeaderPanelBackColor2, 135)) { e.Graphics.FillRectangle(br, rc); } TextRenderer.DrawText(e.Graphics, _headerLabel.Text, _headerLabel.Font, rc, _headerLabel.ForeColor, TextFormatFlags.VerticalCenter); AppColors.PaintBorder(e.Graphics, HeaderPanelBottomBorderColor, rc, BorderSides.Bottom); }