Change PageCollections background color

3 posts, 0 answers
  1. Justin
    Justin avatar
    6 posts
    Member since:
    Apr 2014

    Posted 25 Apr 2014 Link to this post

    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. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 30 Apr 2014 Link to this post

    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.
     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Justin
    Justin avatar
    6 posts
    Member since:
    Apr 2014

    Posted 30 Apr 2014 Link to this post

    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
Back to Top