Hi,
I am able to set background and foreground colors for headers in xamGrid by using HeaderStyle property. However I see that upper left corner of the grid still has an original style (see picture). Is it possible to change it too ? Another question - how to restyle headers for 2nd hierarchy level ?
Thanks,
Ed
Hello Ed,
Thank you for your post. I have been looking into it and I can suggest you the following Styles for HeaderCellControl and ExpansionIndicatorHeaderCellControl in order to achieve the result you want:
<Style TargetType="{x:Type igPrim:ExpansionIndicatorHeaderCellControl}"> <Setter Property="Background" Value="YellowGreen"/> </Style> <Style TargetType="{x:Type igPrim:HeaderCellControl}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=Cell.Row.Level}" Value="1"> <Setter Property="Background" Value="PeachPuff"/> </DataTrigger> </Style.Triggers> <Setter Property="Background" Value="YellowGreen"/> </Style>
Basically I used DataTrigger to apply different Background to the first and second ColumnLayout. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Stefan,
Thank you very much, everything works fine.