
amrutha anil
Top achievements
Rank 1
amrutha anil
asked on 12 Aug 2010, 07:51 AM
Hi,
I would like to set the default themes provided by telerik during the run time. Can I set the themes without dropping the theme controls and generate it during the run time?
Thanks
I would like to set the default themes provided by telerik during the run time. Can I set the themes without dropping the theme controls and generate it during the run time?
Thanks
7 Answers, 1 is accepted
0
Hi amrutha anil,
You can do so, but you will have to make sure that you reference the desired theme DLL in your project. After referencing the required DLLs, you can deserialize the theme you would like to use and apply it to a given control as the code snippet below demonstrates:
I hope this helps.
All the best,
Deyan
the Telerik team
You can do so, but you will have to make sure that you reference the desired theme DLL in your project. After referencing the required DLLs, you can deserialize the theme you would like to use and apply it to a given control as the code snippet below demonstrates:
new Office2007Black().Deserialize();
this.radPageView1.ThemeName = "Office2007Black";
I hope this helps.
All the best,
Deyan
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

Brennan
Top achievements
Rank 1
answered on 10 Sep 2010, 08:27 PM
What if the theme you want to load at runtime is a theme created in the visual style builder and is an xml file? Is this possible?
0
Hello Brennan,
Yes, this scenario is possible. After you create a theme saving as an xml file, you should use RadThemeManager to load it in your application. Please refer to this article for additional information.
Regards,
Nikolay
the Telerik team
Yes, this scenario is possible. After you create a theme saving as an xml file, you should use RadThemeManager to load it in your application. Please refer to this article for additional information.
Regards,
Nikolay
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

Brennan
Top achievements
Rank 1
answered on 17 Sep 2010, 03:13 PM
Well I meant without having to drop a radthememanager onto the form and just purely in code; I should have been more specific. Thanks for the reply.
Cheers,
Brennan
Cheers,
Brennan
0
Hello Brennan,
Thank you for writing.
The easiest way of achieving this scenario will be to save your theme as a package (.tssp file). Saving a theme as package instead of saving it as XML files can be done by clicking File >> Save As >> check the Save As Package checkmark, in Visual Style Builder. Then all you have to do is to load the theme in your project and set it as a theme for the application as shown in the following code snippet:
I hope you find this information helpful. If there is anything else I can assist you with, do not hesitate to contact me.
Regards,
Stefan
the Telerik team
Thank you for writing.
The easiest way of achieving this scenario will be to save your theme as a package (.tssp file). Saving a theme as package instead of saving it as XML files can be done by clicking File >> Save As >> check the Save As Package checkmark, in Visual Style Builder. Then all you have to do is to load the theme in your project and set it as a theme for the application as shown in the following code snippet:
ThemeResolutionService.LoadPackageFile = @
"My path\MyThemeName.tssp"
;
ThemeResolutionService.ApplicationThemeName =
"Office2010"
;
I hope you find this information helpful. If there is anything else I can assist you with, do not hesitate to contact me.
Regards,
Stefan
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

rouf
Top achievements
Rank 1
answered on 15 Jan 2011, 12:22 PM
I change the themes of my application at runtime. But it gives me a flicker (which is 9.5 on richter scale) which is quite visible and hence unacceptable. Here is how i set the theme at runtime
Please help me out.
ThemeResolutionService
.ApplicationThemeName = "ThemeName"
Please help me out.
0
Hello rouf,
Thank you for writing.
The described behavior is uncommon when using this functionality. Therefore, I would like to kindly ask you to open a new support ticket where you can attach files and send us a sample project demonstrating this issue. This will allow us to trace and solve any possible issues.
I am looking forward to your support ticket.
Regards,
Stefan
the Telerik team
Thank you for writing.
The described behavior is uncommon when using this functionality. Therefore, I would like to kindly ask you to open a new support ticket where you can attach files and send us a sample project demonstrating this issue. This will allow us to trace and solve any possible issues.
I am looking forward to your support ticket.
Regards,
Stefan
the Telerik team
This doesn't make any sense: new Office2007Black().Deserialize();
Where's the l-value? What is this even doing?
Hi, Jay,
Please refer to the following help article which demonstrates how to set a theme programmatically:
https://docs.telerik.com/devtools/winforms/styling-and-appearance/using-default-themes#setting-a-default-theme-for-a-whole-application-programmatically
I believe that it would be helpful for you.