I found an example in the documentation on how to change the column headers style. It suggests creating a style with LabelPresenter as the target type and ommitting a key so that it is applied to all column headers. I need to change the style on just a few headers. Is there a way I can assign a header style per column?
Thanks for your help,
Mike
You can set the LabelPresenterStyle on a FieldSettings instance. The FieldSettings class is exposed from the Field (via its Settings property), on the FieldLayout (via its FieldSettings property) and on the control (via its FieldSettings property).
<igDP:XamDataGrid >
<igDP:XamDataGrid.Resources>
<Style x:Key="italicLabel" TargetType="{x:Type igDP:LabelPresenter}">
<Setter Property="FontStyle" Value="Italic" />
</Style>
</igDP:XamDataGrid.Resources>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:Field Name="MyFieldName">
<igDP:Field.Settings>
<igDP:FieldSettings LabelPresenterStyle="{StaticResource italicLabel}" />
</igDP:Field.Settings>
</igDP:Field>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
Many thanks, that's percisely what I was looking for.
But for some reason I cannot get multiple FieldLayout to show up -- on the first one shows up. In the example below, only MyFieldName1 shows up (MyFieldName2 & 3 are missing). Any ideas why that might happen?
<igDP:Field Name="MyFieldName1"/>
<igDP:Field Name="MyFieldName2"/>
<igDP:Field Name="MyFieldName3"/>