2
I have the following block of code setting the style of Header in my shampoo:
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="Background" Value="DimGray"/>
<Setter Property="Height" Value="45"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontFamily" Value="Calibri"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Padding" Value="15 0 0 0"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
</Style>
When the value of the property HorizontalAlignment="Stretch"
the result is this:
But when I change the value to HorizontalAlignment="Center"
happens this:
I want it to be centered but with the whole background filled.
Let the
Property="HorizontalAlignment" Value="Stretch"
and include one more tagHorizontalContentAlignment="Center"
.– Sam
Didn’t work out :(
– Gilthayllor Sousa
One property overwritten the other
– Gilthayllor Sousa