Interestingly, you cannot edit the template DatePicker. I found out by looking at the source code , which for some reason arises because the template is defined in the main control topic - Generic.xamland it does not have a property BorderBrushdefined per se.
- .
, DatePicker, BorderBrush BorderThickness. , - , , ( ). , Microsoft.Phone.Controls.Toolkit, , GAC ( , ) , SDK . , .
, .
( ):
<Style TargetType="controls:DatePicker">
<Setter Property="Background" Value="{StaticResource PhoneTextBoxBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="BorderBrush" Value="Azure"/>
<Setter Property="Foreground" Value="{StaticResource PhoneTextBoxForegroundBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="PickerPageUri" Value="/Microsoft.Phone.Controls.Toolkit;component/DateTimePickers/DatePickerPage.xaml"/>
<Setter Property="ValueStringFormat" Value="{}{0:d}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:DatePicker">
<StackPanel>
<ContentControl
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
Foreground="{StaticResource PhoneSubtleBrush}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="12,0,12,-4"/>
<Button
x:Name="DateTimeButton"
Content="{TemplateBinding ValueString}"
Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
FontFamily="{TemplateBinding FontFamily}"
Foreground="{TemplateBinding Foreground}"
Height="72"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>