How to load a theme exported from Visual Style Builder

5 posts, 0 answers
  1. meraj
    meraj avatar
    47 posts
    Member since:
    Dec 2010

    Posted 26 Mar 2011 Link to this post

    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.
  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 26 Mar 2011 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. meraj
    meraj avatar
    47 posts
    Member since:
    Dec 2010

    Posted 27 Mar 2011 Link to this post

    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


  5. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 27 Mar 2011 Link to this post

    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
  6. Prasy
    Prasy avatar
    1 posts
    Member since:
    Feb 2012

    Posted 08 Sep 2014 Link to this post

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