This is a migrated thread and some comments may be shown as answers.

ControlPanel BackColor resetting to White

3 Answers 56 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 09 May 2008, 02:39 PM
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?

3 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 13 May 2008, 08:36 AM
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
0
Bob
Top achievements
Rank 1
answered on 13 May 2008, 12:39 PM
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.
0
Boyko Markov
Telerik team
answered on 16 May 2008, 02:23 PM
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
Tags
General Discussions
Asked by
Bob
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Bob
Top achievements
Rank 1
Share this question
or