I downloaded a WPFToolkit source, because I wanted to override the default generic template of a DatePicker. For example, I wanted to override this TextBox:
<primitives:DatePickerTextBox x:Name="PART_TextBox"
Grid.Row="0" Grid.Column="0"
Foreground="{TemplateBinding Foreground}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch" />
That means that writing this in my project :
<Style TargetType="{x:Type toolkit:DatePickerTextBox}">
<Setter Property="Text" Value="Bitte wählen" />
<Setter Property="MinHeight" Value="20" />
works perfectly.
But what if I want to change VerticalContentAlignment="Stretch"
to VerticalContentAlignment="Center"
?? The default style always overrides it.
Thanks for response!