New to Telerik UI for WinForms? Download free 30-day trial

Load Themes from a Resource

RadThemeManager cannot load the theme if it is saved as package (tssp file). This is shown in the following article: using custom themes

To load a theme from a resource into a Theme Manager, follow these steps:

  1. Add a RadThemeManager control to your form.

  2. Add the XML file containing the theme to your Microsoft Visual Studio project.

  3. In the Properties window for the XML file, set the Build Action to Embedded Resource.

    tools-visual-style-builder-adding-custom-themes-to-your-application-load-themes-from-a-resource 001

  4. Select the RadThemeManager control and open its Smart Tag menu.

  5. Select the Load Theme From Resources task.

    tools-visual-style-builder-adding-custom-themes-to-your-application-load-themes-from-a-resource 002

  6. Enter your theme's name in the Load Theme dialog box, and then click OK. tools-visual-style-builder-adding-custom-themes-to-your-application-load-themes-from-a-resource 003

  7. Using the same approach, load the theme repository file and all other theme files that you need.

If the form with the theme manager will be opened multiple time in the life cycle of the application, the theme manager needs to be diposed explicitly. A suitable place to call its Dispose method is the Closing event of the form.

See Also

In this article