I am using DatePicker in my application, defined as such:
<DatePicker Width="200" Margin="20, 20, 20, 0" SelectedDate="{Binding PeriodEndDate, Mode=TwoWay}" />
The following shows how to select a date:

How can I get the date (4/22/2015) to center vertically in the text box (the dashed line around the date is the actual border of the text box)?
I tried setting both VerticalContentAlignment and VerticalAlignment to Center , but this does not affect the centering of the date.
If I write to a date picker using Snoops, I can see an element named PART_TextBox in DatePicker . If I change this PART_TextBox VerticalContentAlignment to Center , the text will be centered ( Stretch set by default). However, I do not know how to access this subcomponent to change its VerticalContentAlignment
source share