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

How to Change Theme at Runtime Programatically?

5 Answers 1054 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chintan Shah
Top achievements
Rank 2
Chintan Shah asked on 11 Feb 2010, 07:17 AM
I am Developing application in WPF and want to provide user with option of setting theme explicitly using combobox. but i couldn't find anything on net so please can anyone help me achieve this. and is it possible to get how many themes are installed so that can be bind to any data controls.



Thanks.

5 Answers, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 15 Feb 2010, 10:01 AM
Hi Chintan Shah,

Here you can find more information about telerik themes:
http://www.telerik.com/help/wpf/common-styling-apperance-setting-theme-wpf.html

You can also take a look at our online QSF where the themes are changed dynamically using combo box.
http://www.telerik.com/products/wpf/resources/demo-requirements.aspx

Kind regards,
Boryana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Vikash
Top achievements
Rank 1
answered on 24 May 2012, 02:13 PM
Hi Telerik Team,

Can you provide me sample code?
0
Zlatko
Top achievements
Rank 1
answered on 31 Jul 2018, 12:49 PM

Are you still waiting for sample code?

Yes, you will wait endless time.

0
Martin Ivanov
Telerik team
answered on 01 Aug 2018, 07:17 AM
Hi,

For anyone that hits this forum searching for information how to change theme at runtime, here is an help article showing how to do it using implicit styles. Additionally, you can download the source code of the UI for WPF demos and see how the theme changing mechanism is implemented there.

Note that if you use StyleManager you can switch themes at runtime using the same approach as in the previously linked article, but instead of merging resource dictionaries, you can just set them ApplicationTheme static property of StyleManager. For example:
StyleManager.ApplicationTheme = new GreenTheme();

I hope this will help someone.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Zlatko
Top achievements
Rank 1
answered on 25 Sep 2019, 02:07 PM
Try to install demo
Tags
General Discussions
Asked by
Chintan Shah
Top achievements
Rank 2
Answers by
Bobi
Telerik team
Vikash
Top achievements
Rank 1
Zlatko
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or