Creating a theme component incorporating the new theme repository

2 posts, 0 answers
  1. Tony Sharp
    Tony Sharp avatar
    1 posts
    Member since:
    Dec 2009

    Posted 03 Mar 2010 Link to this post

    Hi,

    I have previously created a theme component as outlined in this thread
    http://www.telerik.com/support/kb/winforms/themes/creating-a-theme-component.aspx

    I am now trying to extend the theme component to work with the theme repository file that is generated by the Q1 2010 version of Visual Style Builder but it does not appear to be working.

    Should it simply be a case of including the theme repository xml file as another embedded resource, along with the other theme files, or is there something else I need to do to get it working?
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 04 Mar 2010 Link to this post

    Hi Tony Sharp,

    Thank you for writing. The new theming logic supports the old style sheets but the new features, the repository in this case, are not applicable to the old themes. The new style sheets contain explicit code which associates styles with repository items. If you need to use repositories with your theme you will have to recreate the theme with the new Visual Style Builder. The new VSB makes creating themes very easy and fast, it should not be an issue.

    Here is what you need to do:

    1. The new VSB has a tool that allows you to generate repositories from old themes. The tool can be found in the main VSB menu under the Tools menu.

    2. Once you do this, you can use this repository and simply drag & drop until you create a new theme that looks exactly like the old one. 

    3. After you have created your new theme you have to save it (again through the main menu). After you save it, the VSB will emit an xml file for each control you have edited and one xml file for the repository that you generated.

    4. In order to use your new theme you have to add a RadThemeManager component to your application and load all previously generated xml files the same way you were loading the old themes. Be sure to load the repository, it must be loaded along the other xml files.

    5. Now you simply need to set the ThemeName property of your controls to the name you chose when you saved the xml files.

    Since you are familiar with the old themes and the repositories I assume that you read some or all of our documentation and have watched the movies about the new Visual Style Builder. Here are the links to these resources (just in case):

    VSB Online documentation.

    Telerik.tv resources.

    Do not hesitate to write again should you encounter any difficulties migrating your old themes and working with Visual Style Builder in general. We are ready to assist you and would be very grateful if you provide feedback on your experience with the new VSB.

    Greetings,

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