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

Set theme from code behind

1 Answer 260 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Tad
Top achievements
Rank 1
Tad asked on 20 May 2009, 05:09 PM
Can you please post some sample code as to how I could change the theme for a chart in code behind?  I just want to switch from the balck theme to either Vista or Simple.

 For the life of me I can't find the method or property to set.

Thanks!!

--Tad Richard

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 21 May 2009, 05:53 AM
Hi Tad,

You can set it just as any other attached property:
RadChart1.SetValue(StyleManager.ThemeProperty, new VistaTheme());

You can also use the StyleManager.SetTheme() method:
StyleManager.SetTheme(RadChart1, new VistaTheme());

Note, that the Simple theme is not available
for RadChart yet. We plan to deliver it with Q2 release, expected in July.

Sincerely,
Ves
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart
Asked by
Tad
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or