Loading Customized theme into ThemeManager

4 posts, 1 answers
  1. Svein Thomas
    Svein Thomas avatar
    47 posts
    Member since:
    Nov 2010

    Posted 02 Dec 2010 Link to this post

    Hi you guys,

    I've been customizing a theme and are now ready to test it out and look if it looks great the application I'm creating.
    First i tried to load the theme by code like this: 
    ThemeResolutionService.LoadPackageResource("WindowsFormsApplication1.Theme.test.tssp");
    But the theme was not applied to the controls. So I went here and found out that i needed to add the thememanager to my form to add the theme.
    So i did this, then i tried to load the theme from file and got the error message attached.
    The theme i have customized is based on the DefaultTheme. To be able to customize that theme i had to export it from the VSB by selecting File->Export Built-in Themes

    So, to figure out what i was doing wrong i tried to load the exported non-customized theme, the theme called "ControlDefault.tssp" when its exported. And the strange thing was that the ThemeManager gave me the exact same message for this theme. So there have to be something wrong with the export method in the VSB.. or something with the ThemeManager???

  2. Answer
    Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 07 Dec 2010 Link to this post

    Hi Svein Thomas,

    Thank you for contacting me.

    RadThemeManager does not work with the .tssp files that we have introduced earlier this year. RadThemeManager works only with .xml files.

    The best approach here is to stay with the .tssp file and load it by using the following code:
    //to use the following line of code, the theme should be added as a resource to your project
    ThemeResolutionService.LoadPackageResource("WindowsFormsApplication1.Theme.test.tssp");
    //or you can take it from the file directly by using:
    //ThemeResolutionService.LoadPackageFile("WindowsFormsApplication1.Theme.test.tssp");
    ThemeResolutionService.ApplicationThemeName = "test";

    I hope you find this information helpful. If there is anything else I can assist you with, do not hesitate to contact me.

    Best wishes,
    Stefan
    the Telerik team
    Get started with RadControls for WinForms with numerous videos and detailed documentation.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Svein Thomas
    Svein Thomas avatar
    47 posts
    Member since:
    Nov 2010

    Posted 14 Dec 2010 Link to this post

    How can i easily find the corresponding Repository Item to a property in within a element.
    Lets say i want to change the MaxSize Property on the StripViewItemContainer. On the left hand side of the values theres a little box with a dot inside. I believe this is a symbol to illustrate that this property have a corresponding repository item. When i rightclick on it I can select "Display value Source", but this tells me nothing. When i browse for MaxSize in the Repository Items, I cannot find it.

    Could you please explain me how I can use the Repository Items? and how to find out which repository item that is used in the property i want to change.

    Regards
    Svein Thomas
  5. Stefan
    Admin
    Stefan avatar
    2890 posts

    Posted 16 Dec 2010 Link to this post

    Hello Svein,

    Thank you for writing.

    Currently, there is no way to determine which repository item is responsible for a specific setting. You can, however, check which repository items are applied to a state by clicking the arrow button (the left one) to display all repository items and see which ones are used (the used ones are marked in red).

    As to the dots that you are seeing, there are two kinds of dots
    • a dot with border, which means that this setting is applied through the property grid;
    • a dot without border, which means that this setting is applied through a repository item;

    I hope this information addresses your question. 
     
    Kind regards,
    Stefan
    the Telerik team
    Check out the Q1 2011 Roadmap for Telerik Controls for Windows Forms.
Back to Top