I have a resource dictionary that contains the following code:
<Style TargetType="{x:Type TextBlock}" >
<Setter Property="FontSize" Value="20"/>
</Style>
In my app.xaml, I merge it globally:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Theme/Default.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
The problem is that the text "Select a Date" in my DatePickers is influenced by the style of the TextBlock, increasing the total height of the Datepicker (only at runtime; in design it looks ok).
When you start typing a date (or select one using the calendar) it does not inherit from TextBlock style. The problem is only the text "Select a Date".
I don't want to set a Key for every textblock in my app.
What do I do to fix this?
EDIT
Looking closer at the MSDN documentation, we can see that the text of a TextBox control is displayed inside a FrameworkElement, and not a TextBlock.
http://msdn.microsoft.com/en-us/library/ms752068%28v=vs.110%29.aspx
And the DatePicker has it's value displayed as a TextBox. But the text "Select a Date" seems to be a TextBlock over the TextBox.
EDIT 2
I can access the TextBox template inside the DatePicker:
http://msdn.microsoft.com/en-us/library/ff468215%28v=vs.110%29.aspx
But nothing about the textblock...