Edit this page

Using default themes

Applying themes to RadControls for WinForms at the control and form level. themes-using-default-themes 002

All themes that come with Telerik UI for for WinForms since version R2 2008 are available as standalone components, apart from the control's assemblies. This improvement has been added in order to simplify the way themes are added to the application and to improve the application’s loading time.

If you have installed the suite from the provided installation files, you will see the themes loaded in the Visual Studio toolbox. If you do not see the themes in the toolbox, you will have to add them manually to the toolbox.

Figure 1: The themes in the Visual Studio toolbox.


In order to use the Theme components, just drag and drop them from the VS Toolbox to the form. This will add a reference to the corresponding theme assembly in the project and will enable the theme in the ThemeName drop-down of all Telerik controls on the form. All you have to do afterwards is to set the needed theme from the ThemeName drop-down (in the smart tag) or programmatically.

Figure 2: Set the theme at design time using the SmartTag.


Setting a default theme for a whole application programmatically

Before using the following code snippets, please make sure that you have added the desired theme DLL file to your project references.

Setting a default theme for the entire application

protected override void OnLoad(EventArgs e)
    Office2007SilverTheme theme = new Office2007SilverTheme();
    ThemeResolutionService.ApplicationThemeName = "Office2007Silver";

Protected Overrides Sub OnLoad(e As EventArgs)
    Dim theme As New Office2007SilverTheme()
    ThemeResolutionService.ApplicationThemeName = "Office2007Silver"
End Sub

Applying theme to all controls in the current form.

When you are working at design time you can change the theme of the form and apply it to all controls on the form. All you need to do is right-click the form and choose the following item:

Figure 3: Apply the current form theme to all controls.


See Also