Align DataGrid Column Header To Center
Answer : Check this <DataGridTextColumn Header="Nombre" Binding="{Binding Nombre}"> <DataGridTextColumn.HeaderStyle> <Style TargetType="DataGridColumnHeader"> <Setter Property="HorizontalContentAlignment" Value="Center" /> </Style> </DataGridTextColumn.HeaderStyle> It should be StaticResource instead of DynamicResource in the Column: Style <Window.Resources> <Style x:Key="CenterGridHeaderStyle" TargetType="DataGridColumnHeader"> <Setter Property="HorizontalContentAlignment" Value="Center"/> </Style> </Window.Resources> Column <DataGridTextColumn Binding="{Binding Path=Name}" Header="Name" IsReadOnly="True" HeaderStyle="{StaticResource CenterGridHeaderStyle}"/> There is a response for doing it progr...