Export (0) Print
Expand All

DatePicker.CalendarStyle Property

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

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

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

XAML Values


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


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.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
© 2015 Microsoft