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

Loading Customized theme into ThemeManager

3 Answers 262 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Svein Thomas
Top achievements
Rank 1
Svein Thomas asked on 02 Dec 2010, 11:09 AM
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???

3 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 07 Dec 2010, 02:04 PM
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.
0
Svein Thomas
Top achievements
Rank 1
answered on 14 Dec 2010, 12:18 PM
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
0
Stefan
Telerik team
answered on 17 Dec 2010, 12:44 AM
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.
Tags
Themes and Visual Style Builder
Asked by
Svein Thomas
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Svein Thomas
Top achievements
Rank 1
Share this question
or