Hi,
How can we change alignemnt of Header Text I tried following but bot working:
<igGrid:TextColumn Key="A"> <igGrid:TextColumn.HeaderTemplate> <DataTemplate> <TextBlock Text="A" HorizontalAlignment="Center" /> </DataTemplate> </igGrid:TextColumn.HeaderTemplate> </igGrid:TextColumn>
<igGrid:TextColumn Key="B"> <igGrid:TextColumn.HeaderTemplate> <DataTemplate> <TextBlock Text="B" TextAlignment="Center"/> </DataTemplate> </igGrid:TextColumn.HeaderTemplate> </igGrid:TextColumn>
following serve the pupose but disturbes the ui of header:
<igGrid:XamWebGrid.HeaderStyle> <Style TargetType="igPrim:HeaderCellControl"> <Setter Property="HorizontalAlignment" Value="Center"/> </Style> </igGrid:XamWebGrid.HeaderStyle>
Thanks
I accomplished by using HorizontalContentAlignment property but still curious to know what Template settings not working
<igGrid:XamWebGrid.HeaderStyle> <Style TargetType="igPrim:HeaderCellControl"> <Setter Property="HorizontalContentAlignment" Value="Center"/> </Style> </igGrid:XamWebGrid.HeaderStyle>
All CellControl's are just ContentControls.
You can see the same behavior here:
<ContentControl >
<TextBlock HorizontalAlignment="Center" Text="Doesn't Work"/>
</ContentControl>
<ContentControl HorizontalContentAlignment="Center">
<TextBlock Text="Works"/>
-SteveZ