Exemple #1
0
 protected override void OnRenderToolStripBackground(System.Windows.Forms.ToolStripRenderEventArgs e)
 {
     if (currentRenderer != null)
     {
         currentRenderer.DrawToolStripBackground(e);
         return;
     }
     base.OnRenderToolStripBackground(e);
 }
Exemple #2
0
        protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
        {
            if (e.ToolStrip is StatusStrip)
            {
                return;
            }
            ToolStripRenderEventArgs ea = new ToolStripRenderEventArgs(e.Graphics, e.ToolStrip, new Rectangle(-10, -3, e.AffectedBounds.Width + 20, e.AffectedBounds.Height + 6), e.BackColor);

            renderer.DrawToolStripBackground(ea);
        }
 protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
 {
     if (_currentRenderer != null)
     {
         _currentRenderer.DrawToolStripBackground(e);
     }
     else
     {
         base.OnRenderToolStripBackground(e);
     }
 }
        protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
        {
            if (e.ToolStrip is StatusStrip)
            {
                return;
            }
            else if (e.ToolStrip is ToolStripDropDownMenu)
            {
                Color back2 = GetThemeColor("ToolStripMenu.BackColor");
                if (back2 != Color.Empty)
                {
                    e.Graphics.FillRectangle(new SolidBrush(back2), e.AffectedBounds.Top, e.AffectedBounds.Left, e.AffectedBounds.Width, e.AffectedBounds.Height);
                    return;
                }
            }
            ToolStripRenderEventArgs ea = new ToolStripRenderEventArgs(e.Graphics, e.ToolStrip, new Rectangle(-10, -3, e.AffectedBounds.Width + 20, e.AffectedBounds.Height + 6), e.BackColor);

            renderer.DrawToolStripBackground(ea);
        }