# Switching Themes at Design-time

The UI for WPF suite provides a mechanism that allows you to change the application theme at design-time with a few clicks.

> This mechanism is available only when the [implicit styles theming](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview) is used. In order to use it you will need to reference the [NoXaml](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml#noxaml-assemblies) version of the Telerik assemblies.

The following example demonstrates how the feature works in few easy steps.

1. Select a Rad-control in the Visual Studio designer at design-time. This will display the Theme button at the designer's top right corner.\
   ![WPF RadButton Theme Button in Visual Studio Designer](https://www.telerik.com/products/wpf/documentation/assets/58dbc5237ba3fb6ad38a440bce75d834/styling-apperance-switching-themes-design-time-01.png)

2. Click on the **Theme** button. This will open the Themes window where you can choose a theme.\
   ![WPF Visual Studio Themes Window](https://www.telerik.com/products/wpf/documentation/assets/e43a6a2eb7d7d5d50bcb6101effe19ed/styling-apperance-switching-themes-design-time-02.png)

3. Select a theme and click **OK**.

This will automatically add the new theme dll in the references of the project and merge the required resource dictionaries in the **App.xaml resources**.

> caption The added theme assembly reference

![WPF The added theme assembly reference](https://www.telerik.com/products/wpf/documentation/assets/9e3c321a085350f3ca38b3a6f8c8c878/styling-apperance-switching-themes-design-time-03.png)

**Example 1: The merged theme resources**

```XAML
	<Application.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/Themes/System.Windows.xaml" />
				<ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/Themes/Telerik.Windows.Controls.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</Application.Resources>
```

You can change the theme also by using the [Project Configuration Wizard for Telerik UI for WPF](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-extensions/extensions-project-configuration).

## Switching Themes at Design-time per control

With the **R2 2019** version we introduced the option to change the theme per control at design-time.

> This option is available only when the [StyleManager](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview#setting-a-theme-using-stylemanager) is used. In order to use it you will need to reference the [Xaml](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml#xaml-assemblies) version of the Telerik assemblies.

The following example demonstrates how the feature works in few easy steps.

1. Select a **Rad-control** in the Visual Studio designer at design-time. This will display a button on the right side of the control.

   ![RadButton Change Theme at Design Time](https://www.telerik.com/products/wpf/documentation/assets/520271a7914879a5e578e75e69fe9e04/dynamicswitchthemespercontrol.png)

2. Click the button and under Appearance, you can select the theme that you want to apply to the control. The **StyleManager.Theme** attached property will be set to the chosen theme. The result is demonstrated in **Example 2**.
   ![RadButton with the Office2016 theme](https://www.telerik.com/products/wpf/documentation/assets/43755088df8db408ff1ac6f361cca7e5/dynamicswitchthemespercontrol_01.png)

**Example 2: RadButton with Office2016 theme applied**

```XAML
	<telerik:RadButton Content="Change theme from designer" telerik:StyleManager.Theme="Office2016"   />
```

## See Also

* [Set a Theme with Implicit Styles](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview)
* [Switch Themes at Runtime](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/how-to/styling-apperance-themes-runtime)
* [Edit Telerik Control Templates](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-editing-control-templates)
