# Themes

## Content



Silverlight 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.

When [C1OutlookBar](/componentone/api/wpf/online-outlookbar/dotnet-framework-api/C1.WPF.OutlookBar.4.6.2/C1.WPF.OutlookBar.C1OutlookBar.html) is added to your project, it appears with the default theme, which looks similar to the following image:

![](https://cdn.mescius.io/document-site-files/images/db635c5e-6066-484d-b52e-211cb3bb2abd/imagesext/image12_1.png)

[C1OutlookBar](/componentone/api/wpf/online-outlookbar/dotnet-framework-api/C1.WPF.OutlookBar.4.6.2/C1.WPF.OutlookBar.C1OutlookBar.html) supports Office 2010 and Office 2007 themes. It can be themed with one of the many included Silverlight themes: Office2010 (_C1ThemeOffice2010Blue_, _C1ThemeOffice2010Black_, and _C1ThemeOffice2010Silver_), Office2007 _(C1ThemeOffice2007Blue_, _C1ThemeOffice2007Black_, and _C1ThemeOffice2007Silver_), _C1ThemeBureauBlack, C1ThemeExpressionDark, C1ThemeExpressionLight, C1ThemeCosmopolitan, C1ThemeRanierOrange, C1ThemeShinyBlue, and C1ThemeWhistlerBlue_. C1OutlookBar Themes

**Outlookbar for WPF and Silverlight** incorporates several themes that allow you to customize the appearance of your grid. When you add a **C1OutlookBar** and **C1OutlookItem** controls to the page, they appears similar to the following image:

![](https://cdn.mescius.io/document-site-files/images/db635c5e-6066-484d-b52e-211cb3bb2abd/imagesext/image12_9.png)

This is the control's default appearance. You can change this appearance by using one of the built-in themes or by creating your own custom theme. All of the built-in themes are based on WPF Toolkit themes. The built-in themes are described and pictured below:

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**.