# C1DateTimePicker Theming

## Content



Themes are a collection of image settings that define the look of a control or controls. The benefit of using themes is that you can apply the theme across several controls in the application, thus providing consistency without having to repeat styling tasks.


> type=note
> **Note**: Themes are only supported in .NET Framework.

When the C1DateTimePicker control is added to your project, it appears with the default theme, which looks as follows:

![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/default.png)

But the **C1DateTimePicker** control can also be themed with one of our thirteen included WPF themes: _BureauBlack, C1Blue, ExpressionDark, ExpressionLight, Office2007Black, Office2007Blue, Office2007Silver, Office2010Black, Office2010Blue, Office2010Silver, ShinyBlue,_ and _WhistlerBlue_. The table below provides a sample of each theme:

|   **Theme Name**   |   **Appearance**   |
| --- | --- |
|   BureauBlack   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/bureaublack.png)   |
|   C1Blue   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/c1blue.png)   |
|   Cosmopolitan   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/cosmopolitan.png)   |
|   ExpressionDark   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/expressiondark.png)   |
|   ExpressionLight   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/expressionlight.png)   |
|   Office2007Black   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/office2007black.png)   |
|   Office2007Blue   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/office2007blue.png)   |
|   Office2007Silver   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/office2007silver.png)   |
|   Office2010Black   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/office2010black.png)   |
|   Office2010Blue   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/office2010blue.png)   |
|   Office2010Silver   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/office2010silver.png)   |
|   ShinyBlue   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/shinyblue.png)   |
|   WhistlerBlue   |   ![](https://cdn.mescius.io/document-site-files/images/b827ed78-bea0-4378-af62-5f467cc00dcc/narrative/whistlerblue.png)   |

To set an element's theme, use the **ApplyTheme** method. First add a reference to the theme assembly to your project, and then set the theme in code, like this:

```vbnet
Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
   Dim theme As New C1ThemeExpressionDark
   ' Using ApplyTheme
   C1Theme.ApplyTheme(LayoutRoot, theme)
```

```csharp
private void Window_Loaded(object sender, RoutedEventArgs e)
   {
      C1ThemeExpressionDark theme = new C1ThemeExpressionDark();
      //Using ApplyTheme
      C1Theme.ApplyTheme(LayoutRoot, theme);
   }
```

To apply a theme to the entire application, use the **System.Windows.ResourceDictionary.MergedDictionaries** property. First add a reference to the theme assembly to your project, and then set the theme in code, like this:

```vbnet
Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
   Dim theme As New C1ThemeExpressionDark
   ' Using Merged Dictionaries
Application.Current.Resources.MergedDictionaries.Add(C1Theme.GetCurrentThemeResources(theme))
End Sub
```

```csharp
private void Window_Loaded(object sender, RoutedEventArgs e)
   {
      C1ThemeExpressionDark theme = new C1ThemeExpressionDark();
      //Using Merged Dictionaries        Application.Current.Resources.MergedDictionaries.Add(C1Theme.GetCurrentThemeResources(theme));
   }
```

Note that this method works only when you apply a theme for the first time. If you want to switch to another ComponentOne theme, first remove the previous theme from **Application.Current.Resources.MergedDictionaries**.