# Setting the Calendar Theme

## Content



All calendar controls use the current system theme, by default. If you want to use a different theme, there are several ways to select a new one.

**To set the theme at design time in Visual Studio**:

1.  Right-click the control.
2.  Select **Theme** and choose one of the seven predefined themes.


> type=note
> **Note**:You can also change the theme through the Properties window by selecting the option from the drop-down list next to the [CalendarBase.Theme](/componentone/api/wpf/online-scheduler/dotnet-framework-api/C1.WPF.Schedule.4.6.2/C1.WPF.Schedule.CalendarBase.Theme.html) property.

**To set the theme in Microsoft Blend, change the** CalendarBase.Theme **property at design time**:

1.  Select the C1Calendar control in your XAML window or page.
2.  In the Properties panel, under **Appearance**, click the drop-down arrow next to the CalendarBase.Theme property and choose one of the predefined themes.

**To set the theme using the ResourceID, use the following XAML**:

```xml
<my:C1Calendar x:Name="calendar1" MaxSelectionCount="14"
Theme="{DynamicResource {ComponentResourceKey
TypeInTargetAssembly=my:CalendarBase, ResourceId= MediaPlayer}}"/>
```

**To set the theme using C1CalendarResources static fields, add the following code to your project**:

```vbnet
calendar.Theme = C1CalendarResources.MediaPlayer
```

```csharp
calendar.Theme = C1CalendarResources.MediaPlayer;
```

**To set the theme by defining a ResourceDictionary and DefaultThemeKey in your Page, Window, or Application resources**:

```xml
<Page.Resources>
           <ResourceDictionary>
<ResourceDictionary x:Key="{x:Static my:CalendarBase.DefaultThemeKey}"
Source="/C1.WPF.C1Schedule;component/themes/CalendarThemes/MediaPlayer/MediaPlayer.xaml" />
           </ResourceDictionary.MergedDictionaries>
     </Page.Resources>
```

Note that this will affect all controls in the current scope.

You can also create your own theme ResourceDictionaries and use them with the calendar controls.

The best way to customize one of the predefined themes is to include the default theme definition in a custom ResourceDictionary and redefine necessary resources, such as theme brushes, there.


> type=note
> **Note**: To ensure all default styles and templates continue to work correctly during customization, it is suggested that the resource keys are not changed from their default settings.