Ejemplo n.º 1
0
        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);
            }
        }