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

Programatically setting a theme

1 Answer 124 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
michael
Top achievements
Rank 1
michael asked on 20 Jul 2008, 10:24 PM
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.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 21 Jul 2008, 01:08 PM

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
Tags
Themes and Visual Style Builder
Asked by
michael
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or