Programatically setting a theme

2 posts, 0 answers
  1. michael
    michael avatar
    2 posts
    Member since:
    Jun 2008

    Posted 20 Jul 2008 Link to this post

        I have unsuccesfully been trying to programmatically set the theme of a 'RadPanel' to "Office2007Blue". At Design time i have been using this them in my app. At runtime i create multiple RadPanels and would like to apply this same theme to them also. How can i do this at runtime, programatically?

        Many thanks, Michael.
  2. Nikolay
    Nikolay avatar
    1805 posts

    Posted 21 Jul 2008 Link to this post

    Hello Michael,

    In cases when you are creating RadPanels run-time, you should set the ThemeName property to "Office2007Blue":

    RadPanel panel1 = new RadPanel();  
    panel1.Text = "Run-time created RadPanel";  
    panel1.Location = new Point(0, 0);  
    panel1.Size = new Size(300, 300);  
    panel1.ThemeName = "Office2007Blue"

    I have attached a sample application which demonstrates this behavior. If you have additional questions, feel free to contact me.


    the Telerik team

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