I want to change the alignment of a header on a datagrid in Silverlight, and I can't seem to figure out how to do it. Here's what I have so far:
<data:DataGridTextColumn Header="#"
IsReadOnly="True"
ElementStyle="{StaticResource CenterAlignStyle}"
Binding="{Binding OutlineNumber, Mode=OneWay}" >
<data:DataGridTextColumn.HeaderStyle>
<Style TargetType="prim:DataGridColumnHeader">
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</data:DataGridTextColumn.HeaderStyle>
</data:DataGridTextColumn>
No matter what I try, I can't seem to change the default alignment, which appears to be "left."