Applying Custom theme

4 posts, 0 answers
  1. Marco
    Marco avatar
    17 posts
    Member since:
    Jun 2018

    Posted 26 Oct 2018 Link to this post

    Hello

    I have actually the same Problem as this guy: https://www.telerik.com/forums/themes---why-is-this-so-difficult

    I've created a custom theme in a tssp file and I'm struggling applying it. As the Person in the other thread says adding it to theme Manager results in a Exception. The link in the answer says that I could just set the ThemeName Property of the control to the name of the Control but this seems neither to be working.

    I can't figure out how this should be done...

     

    Thank You for your help

  2. Dimitar
    Admin
    Dimitar avatar
    2907 posts

    Posted 29 Oct 2018 Link to this post

    Hello Marco,

    It is easier to load the theme in the code behind. An example is available here: Using custom themes.

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    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.
  3. Marco
    Marco avatar
    17 posts
    Member since:
    Jun 2018

    Posted 29 Oct 2018 in reply to Dimitar Link to this post

    Just doesn't work....

  4. Dimitar
    Admin
    Dimitar avatar
    2907 posts

    Posted 29 Oct 2018 Link to this post

    Hi Marco,

    You only need the following two lines to load the theme. Please make sure that the theme is not renamed after saving and use the exact same name as in Visual Style Builder:
    ThemeResolutionService.LoadPackageFile(@"C:\ControlDefault1.tssp");
    ThemeResolutionService.ApplicationThemeName = "ControlDefault1";

    Let me know how this works for you.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top