WPF DataGrid: How to set content alignment of RowHeader to 'Center'
- by Nike
I use WPF DataGrid. I put a text value in RowHeader and want to set alignment of RowHeader content to 'Center'. I tried this:
<toolkit:DataGrid.RowHeaderStyle>
<Style TargetType="{x:Type toolkit:Primitives.DataGridRowHeader}">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
</toolkit:DataGrid.RowHeaderStyle>
but it doesn't work.
Actually I think that there is TextBlock in RowHeader and I need to set its TextAlignment Property to Center. How can do it?