Background problem in the DataGrid Header

1

I have the following code block defining the Header style in my xaml:

<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 HorizontalAlignment="Stretch" property is the result:

But when I change the value to HorizontalAlignment="Center" this happens:

I want it to be centralized but with the background all filled in.

    
asked by anonymous 19.07.2018 / 22:00

0 answers