private void ToolTipWindow_Paint(object sender, PaintEventArgs e) { BackgroundDecorator.Paint(e.Graphics, this.Handle); bool isVisualTheme = Native.IsThemeActive() != 0; if (isVisualTheme) { if (ShowPreview()) { GraphicsPath gp; using (gp = RoundedRectangle.Create(0, 0, Width - 1, Height - 1, 7)) { e.Graphics.DrawPath(Theme.TaskbarTopLine1, gp); } using (gp = RoundedRectangle.Create(1, 1, Width - 3, Height - 3, 7)) { e.Graphics.DrawPath(Theme.TaskbarTopLine2, gp); } } else { e.Graphics.DrawRectangle(Theme.TaskbarTopLine1, 0, 0, Width - 1, Height - 1); e.Graphics.DrawRectangle(Theme.TaskbarTopLine2, 1, 1, Width - 3, Height - 3); } } else { ButtonBorderDecorator.Draw(e.Graphics, 0, 0, Width - 2, Height - 2, false); } DrawThumbnail(); }
private void SecondaryTaskbar_Paint(object sender, PaintEventArgs e) { BackgroundDecorator.Paint(e.Graphics, this.Handle); Control ctrl = sender as Control; OneBorderDecorator.Draw(e.Graphics, ctrl, TaskbarLocation); }
protected new void Paint(Graphics g) { BackgroundDecorator.Paint(g, this.Handle); var taskbarLocation = this.MainForm.TaskbarLocation; if (!IsNearEdge(taskbarLocation)) { return; } OneBorderDecorator.Draw(g, this, taskbarLocation); }
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { if (Native.IsThemeActive() == 0) { base.OnPaint(e); Pen dark = new Pen(Color.FromKnownColor(KnownColor.ButtonShadow)); e.Graphics.DrawLine(dark, 0, 0, Width, 0); e.Graphics.DrawLine(dark, 0, 0, 0, Height); Pen light = new Pen(Color.FromKnownColor(KnownColor.ButtonHighlight)); e.Graphics.DrawLine(light, 0, Height - 1, Width, Height - 1); e.Graphics.DrawLine(light, Width - 1, 0, Width - 1, Height); } else { BackgroundDecorator.Paint(e.Graphics, this.Handle); OneBorderDecorator.Draw(e.Graphics, this, _mainForm.TaskbarLocation); } }