Dynamically load theme assembly

2 posts, 0 answers
  1. Markus
    Markus avatar
    40 posts
    Member since:
    Sep 2008

    Posted 22 Jul 2009 Link to this post

    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
  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 24 Jul 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top