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

Dynamically load theme assembly

1 Answer 157 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 22 Jul 2009, 12:56 PM
Hi,

is it possible to dynamically load a default theme assembly at runtime an set the theme as application theme. The user should be able to choose between all available themes. Now I have an object for all themes on main form and a reference to each theme. But in order to save loading time I want to load the assembly of the configured theme at application start. I did not found any documentation or sample how to do this.


Regards,

Markus

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 24 Jul 2009, 03:13 PM
Hi Markus,

There are two time consuming operations regarding themes - the first one is creating theme component instances which load themes in the application and the second one is applying a theme to a control. Only the fact that you have referenced theme assemblies does not increase the application start-up time.

In order to optimize the application start-up time, you can create the theme component instances in a separate thread. You will have your theme components created, but you will not feel any performance decrease coming from this fact.

I am attaching a sample project to demonstrate this. Just try running the project with and without the performance optimizations and you will notice the difference.

I hope this helps. If you have additional questions, feel free to contact me.

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