What is the BackColor of a ToolStrip control

Posted on 2008-11-10
Last Modified: 2013-12-17
I have put a ToolStrip control onto my form, it's colour is a nicely shaded light blue at the top to a darker blue at the bottom.

At run time if I inspect the BackColor property it is:
 "{Name=Control, ARGB=(255, 236, 233, 216)}" which for my XP Theme is a gray colour.

Now if I change the color to say Color.Blue then I lose the shading a get a solid blue BackColor.
If I try to revert the BackColor to it's original value the ToolStrip is a flat plain grey with no shading.

How do I change the color of the ToolStrip control and keep the color gradient of the control?
Question by:openshac
    LVL 46

    Accepted Solution

    Hi openshac,

    The BackColor of the Toolstrip control accepts flat colors only. To set the BackColor to it's original state, set the BackColor to Color.Empty....

        toolStrip1.BaclColor = Color.Empty;

    To apply a Gradient to the Toolstrip, you'll need handle the Paint event....

         private void ToolStrip1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
             System.Drawing.Drawing2D.LinearGradientBrush lgb = new System.Drawing.Drawing2D.LinearGradientBrush(e.ClipRectangle, Color.Blue, Color.LightBlue, System.Drawing.Drawing2D.LinearGradientMode.Vertical);
             e.Graphics.FillRectangle(lgb, e.ClipRectangle);


    LVL 6

    Author Closing Comment

    Great answer.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now