Strange appearance of WPF DatePicker
.net-4.0, datepicker, wpf
Solution
Thanks Jorge, it was a `Button` style in the App.xaml:
<Style TargetType="{x:Type Button}">
<Setter Property="Margin" Value="0 5 10 5" />
</Style>
This style applied to the button inside of the `DatePicker` as well.
Problem
In my WPF application on .NET 4.0, I'm using two `DatePicker`s and two `TextBlock`s in a horizontal `StackPanel`, and it looks like this: In the left `DatePicker`, I experimented with a higher font size. Apart from that, there are no special settings or styles. The buttons are aligned to the `TextBlock`s, but the text in the `DatePicker` is not. Any idea how to change the alignment of the date text? EDIT: Here's my XAML: ``` <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" > <TextBlock Text="from " /> <DatePicker SelectedDate="{Binding FromDate, Mode=TwoWay}" FontSize="14" /> <TextBlock Text=" until " /> <DatePicker SelectedDate="{Binding ToDate, Mode=TwoWay}" /> </StackPanel> ```