I am using a xamGrid in my SL4 app. I am manually creating some columns, not using XAML. At the time that i am constructing the column I am setting HeaderTextHorizontalAlignment = HorizontalAlignment.Center yet I am not seeing the column header centered. What am I doing wrong?
Here is the exact code TextColumn c2 = new TextColumn { Key = "CustomerNumber", HeaderText = "Customer\nNo.", HorizontalContentAlignment = HorizontalAlignment.Center, HeaderTextHorizontalAlignment = HorizontalAlignment.Center }; _orderConfigurationGrid.Columns.Add(c2);
I have also set the following style the app.xaml file and I can see it turn red but it is still left justified
<Style x:Key="HeaderStyle" TargetType="igPrim:HeaderCellControl"> <Setter Property="Foreground" Value="Red" /> <Setter Property="HorizontalAlignment" Value="Stretch"></Setter> <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> </Style>