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

Change PageCollections background color

2 Answers 103 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 2
Justin asked on 26 Apr 2014, 12:04 AM
When adding a RadWizard to a form and setting a theme to a dark theme, each page's background color gets set to 'White".

I can change this manually as long as you dont set a theme, if you set a theme at run time it makes the pages back ground color white again. 
Is there a way to change default back ground color ? I feel these controls should be set to transparent or at lest the forms color and not "White" specially when using a theme. 

I mean I can run a for loop and iterate through the page collections and set the background but I hope there is a better way.

2 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 30 Apr 2014, 04:52 PM
Hello Justin,

Thank you for contacting us.

In this case you can change the BackColor for all pages with the following code:
foreach (var item in radWizard1.Controls)
{
    if (item is Panel)
    {
        Panel p = item as Panel;
        p.BackColor = Color.Red;
    }
}

Changed this way the color should remain intact when the theme is changed. For convenience I have prepared a small sample where the theme can be changed upon button click. Could you please check it and let me know how it fits in your case?
 
I hope this helps.

Regards,
Dimitar
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Justin
Top achievements
Rank 2
answered on 30 Apr 2014, 04:59 PM
Yes, this will work perfectly then. 
Basically I can now just set the background color to transparnet and it will match the control behind it, even after a theme change. 


Thank you
Justin
Tags
Wizard
Asked by
Justin
Top achievements
Rank 2
Answers by
Dimitar
Telerik team
Justin
Top achievements
Rank 2
Share this question
or