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

Setting a Theme with StyleManager

This help article will show you how to set a built-in theme to Telerik UI for WPF. You will also see code examples for these related topics:

See the Telerik themes in the Avilable Themes article.

In order to use one of the themes with the StyleManager you need to add references to the Telerik assemblies in your WPF project. You can find more information about the control dependencies in the Control Dependencies topic.

Setting a Theme per Control

In order to change the theme of a single control in XAML you need to set the StyleManager.Theme attached property.

Changing the theme of a RadSlider to Windows11 in XAML

<telerikControls:RadSlider telerikControls:StyleManager.Theme="Windows11"/>  

The following example shows how to change the theme of a single control in code-behind.

Changing the theme of a RadSlider to Windows11 in code

StyleManager.SetTheme(this.radSlider, new Windows11Theme() ); 
StyleManager.SetTheme(Me.radSlider, New Windows11Theme()) 

RadSlider with Windows11 theme applied

Common Styling Theming Setting Built In Theme 020 WPF

Setting Application-Wide Theme

Changing the application theme is similar to changing the theme of single controls in WPF. However, changing the application theme has a much bigger impact as it affects all controls in the scope of your application. You can use the constructor of your application or the main window to set the desired theme.

Set application-specific theme in the MainWindow constructor

public partial class MainWindow : Window 
{ 
    public MainWindow() 
    { 
        StyleManager.ApplicationTheme = new Windows11Theme(); 
        InitializeComponent(); 
    } 
} 
Public Partial Class MainWindow 
    Inherits Window 
    Public Sub New() 
        StyleManager.ApplicationTheme = New Windows11Theme() 
        InitializeComponent() 
    End Sub 
End Class 

Set application-specific theme in the App constructor

public App() 
{ 
    StyleManager.ApplicationTheme = new Windows11Theme(); 
    InitializeComponent(); 
} 
Public Class App 
    Inherits Application 
    Public Sub New() 
        StyleManager.ApplicationTheme = New Windows11Theme() 
        InitializeComponent() 
    End Sub 
End Class 

See Also

In this article