RadTreeView for ASP.NET

Support for .Net 2.0 Themes Send comments on this topic.
See Also

Glossary Item Box

Among the numerous innovations the .NET Framework v2.0 introduces are the so-called Themes. They enable the separation of a control's look from its functionality. As a result, developers will be able to completely change the look of a control in an easy declarative manner. This improves the maintainability of your site and avoid unecessary duplication of code for shared styles.

Theme is a folder with one or more .skin files and any additional necessary resources (such as .CSS files, images, etc). The skin files contain XML tags that are used to configure the controls on the page. Those tags look almost identically to regular ASP.NET tags so you can very conveniently copy paste settings between the Theme and your controls file (ASPX/ASCX).

Using Themes local to the application

Themes can be local for the application (each theme resides in a separate folder under the "app_themes" folder in the root of the web application). 

To use Themes you need to copy the "app_themes" directory (if available for the specific component) under the same name to your application's root directory.

The "app_themes" directory is available for copying from your Telerik Rad[Control] directory:
Example: C:\Program Files\Telerik\r.a.d.[control]\app_themes

Using Themes global to the system

Themes are globally accessible from .NET 2.0 applications if they reside in the .NET framework directory, under a special folder called "app_themes". This feature is supported by Telerik controls, however requires special lowered security settings, until standard access mechanisms are provided in .NET Framework final release.

Overriding the default Themes folder

You can change the default location of the "app_themes" folder using the ThemesDir property of Telerik RadMenu. The default value for this property is "~/app_themes/" where "~/" represents your web application root. You can change the value of the property and Telerik Rad[Control] will search its theme in the specified folder. However, since the shipped themes are created to use the app_themes folder, you should change manually the .skin files in order to reflect the change.

For example you might have to change the values of the ImagesBaseDir and CssFile, which by default start with "~/app_themes/".

Design-time support for Themes

In order to apply a Theme to r.a.d.menu you could either use the "Apply Theme" dialog (available through component-associated right-click context menu) in Visual Studio .NET design mode or specify the path of Theme property in the Telerik Rad[Control] control Tag, which is usually found in the XML file of the Page/Control.

Example:
<radm:radmenu
   id="RadMenu1"
   runat="server"
   ContentFile="~/Examples/Design/Terminal/menu.xml"
   Theme="Terminal">
</radM:radmenu>

See Also