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

How to load a theme exported from Visual Style Builder

4 Answers 336 Views
GridView
This is a migrated thread and some comments may be shown as answers.
meraj
Top achievements
Rank 1
meraj asked on 26 Mar 2011, 04:02 PM
Dear Telerik Support
                                  I have developed a theme for RadGridView ( winforms ). I go to file menu and click save. it produces two xml files. Please tell me why two files created and how to load the new theme in Visual Studio 2008 Windows form. I have winform application on vb.net. I searched every option to find any way to import custom theme developed and exported by VSB.

4 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 26 Mar 2011, 05:33 PM
Hello Meraj,

Please take a look at this help article.
This should solve all of your problems.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga

Telerik WinForms MVP
0
meraj
Top achievements
Rank 1
answered on 27 Mar 2011, 03:41 PM
According to the following tutorial.

http://www.telerik.com/help/winforms/themes-using-custom-themes.html

i created theme and exported in tssp format, than i loaded the theme in my application, it created Themes folder using this line of code.

ThemeResolutionService.LoadPackageFile(@"C:\CustomTheme.tssp");

i changed the theme on form load as follows.

MyRadGridView.ThemeName = "CustomTheme" ;

The theme is not loaded, the grid still shows old theme. Now to make you worry, i changed the theme name on design time, but it has not changed, even telerik default themes are not applying. i used "Office2007Black" theme name it changed the appearance of grid on design time but when i run it shows the old theme ( blue color scheme )

I also tried the whole scenario with fresh WindowsFormApplication. if you ask me i could send you the sample application.

Please help


0
Emanuel Varga
Top achievements
Rank 1
answered on 27 Mar 2011, 09:16 PM
Hello again Meraj,

I would suggest using a single theme for the entire application, in my point of view it's much better for consistency.
For this reason i would suggest you try the following line from the help link i've posted before and the one you've posted:
ThemeResolutionService.ApplicationThemeName = "CustomTheme";

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga

Telerik WinForms MVP
0
Prasy
Top achievements
Rank 1
answered on 08 Sep 2014, 03:40 PM
Hello,

This post has been a some yrs ago. But I have same issue. My custom theme is not loading in my application, I created the theme in Visual Style Builder and exported in tssp format, than I loaded the theme in my application and I am not using any default themes provided by teleriks on my application(FYI I am using Winforms form not rad form). below is the code snippet for loading

ThemeResolutionService.LoadPackageFile(@"C:\MyLocalProjects\testtheme\testtheme\BrownThemeGrid3.tssp");
ThemeResolutionService.ApplicationThemeName = "BrownThemeGrid3";

Dictionary<string, int> val = new Dictionary<string, int>();
val.Add("adc", 1);
val.Add("adt", 2);
val.Add("agg", 3);
val.Add("aff", 4);
radGridView1.DataSource = val;

// radGridView1.ElementTree.EnableTheming = false;
radGridView1.ThemeName = "BrownThemeGrid3";

I also did tried saving the Theme as xml files and than use the Theme Manager on my application to load the Theme and Applied the ThemeName property on the GridView Properties but still it is not working.Please help
Tags
GridView
Asked by
meraj
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
meraj
Top achievements
Rank 1
Prasy
Top achievements
Rank 1
Share this question
or