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

    Hello,
       
        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
    Admin
    Nikolay avatar
    1803 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);  
    this.Controls.Add(panel1);  
    panel1.ThemeName = "Office2007Blue"

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

    Greetings,

    Nikolay
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top