This documentation is archived and is not being maintained.

DatePicker.CalendarStyle Property

Gets or sets the style that is used when rendering the calendar.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public Style CalendarStyle { get; set; }
    <Style .../>
<DatePicker CalendarStyle="{resourceExtension styleResourceKey}"/>

XAML Values


One of the following: StaticResource or DynamicResource. For more information, see Resources Overview.


The key that identifies the template being requested. The key refers to an existing resource in a ResourceDictionary.

Property Value

Type: System.Windows.Style
The style that is used when rendering the calendar.

Identifier field


Metadata properties set to true


Use the CalendarStyle property to specify the appearance of the drop-down calendar.

The following example creates a Style for Calendar and assigns the style to the CalendarStyle property.

    <Style TargetType="Calendar"
      <Setter Property="Background" Value="LightBlue"/>
      <Setter Property="BorderBrush" Value="DarkBlue"/>
      <Setter Property="BorderThickness" Value="5"/>

  <DatePicker Background="DarkBlue"
              CalendarStyle="{StaticResource DateTimeCalendar}"/>

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.