I'm able to align the content of the table to the right with HorizontalContentAlignment; however, my issue is I'm trying to align the actual table headers as well. Does anybody know of a way of doing this?
Hello Craig,
Thank you for your post!
To align the header content of the XamDataGrid, I would recommend setting the LabelTextAlignment property in the XamDataGrid.FieldSettings area. This will center the text in the headers of the fields in your XamDataGrid. The XAML would look something like this:
<ig:XamDataGrid.FieldSettings><ig:FieldSettings LabelTextAlignment="Center"/></ig:XamDataGrid.FieldSettings>
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Hey, thanks for the reply. IF I wanted to set it only on certain fields how would I do that?
Each field in the XamDataGrid has the ability to set its own FieldSettings, which means you can set the LabelTextAlignment on a per-field basis if you wish. If you manually generate your columns, the XAML would look something like the below:
<ig:Field Name="FieldName"><ig:Field.Settings><ig:FieldSettings LabelTextAlignment="Center"/></ig:Field.Settings></ig:Field>
I have also attached a sample project to demonstrate. This sample project has three fields, each with a different LabelTextAlignment applied to it.
Thanks for all the help you've been, I got it to work.