How to set BackColor of ToolStripStatusLabel in custom theme?

2 posts, 0 answers
  1. Mark
    Mark avatar
    4 posts
    Member since:
    Mar 2012

    Posted 07 Jan 2013 Link to this post

    I have a custom theme (.tssp file) that is an exact copy of the built-in Windows7 theme.  I have a RadForm with a StatusStrip.  The StatusStrip contains a ToolStripStatusLabel.  I need to change the default BackColor of the ToolStripStatusLabel in VisualStyleBuilder but I cannot figure out how to do it.

    Please help!

  2. Anton
    Anton avatar
    167 posts

    Posted 10 Jan 2013 Link to this post

    Hello Mark,

    Thank you for writing.

    Currently, you cannot change the back color of the labels inside the RadStatusStrip through the theme. By default they are transparent so they will take their parents' color. However, you can achieve the desired behavior very easy with code. For example:
    ThemeResolutionService.ApplicationThemeName = "Windows7";
    foreach (RadElement item in this.radStatusStrip1.StatusBarElement.Items)
        if (item is RadLabelElement)
            RadLabelElement label = item as RadLabelElement;
            label.LabelFill.BackColor = Color.Red;
            label.LabelFill.BackColor2 = Color.Red;
            label.LabelFill.BackColor3 = Color.Red;
            label.LabelFill.BackColor4 = Color.Red;

    Should you have any other questions, I will be glad to assist you.

    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. DevCraft R3 2016 release webinar banner
Back to Top