ControlPanel BackColor resetting to White

4 posts, 0 answers
  1. Bob
    Bob avatar
    72 posts
    Member since:
    May 2008

    Posted 09 May 2008 Link to this post

    I have a SplitContainer which holds a a RadPanel.  I've checked EnableHostControlMode and now I have a RadPanelBarGroupElement.ControlPanel.

    I'm trying to change the color to transparent, but no matter what I choose, once I start the app, it changes to white.

    Suggestions?
  2. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 13 May 2008 Link to this post

    Hi Bob,

    Thank you for contacting us.

    It depends on what backColor is serialized in design-time. You can take a look at the Form's Designer.cs file and search for ContentPanel's BackColor property. If you would like you can manually change the backColor in the constructor of your application's form after the call of the InitializeComponent method. There you can set the ContentPanel's BackColor property without any problems.

    Please write me back if I could be of further help.
     
      
    All the best,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Bob
    Bob avatar
    72 posts
    Member since:
    May 2008

    Posted 13 May 2008 Link to this post

    I see the following in my Form.Designer.cs:

    e.RadPanelBarGroupElement1.ContentPanel.BackColor = System.Drawing.Color.LightSteelBlue;

    That would tell me that the color should be LightSteelBlue when run, but I still see white.

    If I copy that line to my Form.Load sub,
    the color shows as expected.  Why didn't it work with just the code in the Form.Designer.cs...I shouldn't have to set the initial color twice.
  4. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 16 May 2008 Link to this post

    Hello Bob,

    I'm still investigating this issue, Bob. It is great that there is an easy workaround for this case. Have you tried to put the line which sets the ContentPanel's BackColor after the call of EndInit method in the designer? We load the themes there and if the theme has predefined backcolor for the contentPanel it would be set on the EndInit call, too. This method is after the serialized backColor of the contentPanel and will set the backcolor again.

    I hope this helps. 


    All the best,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top