Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1690
xamGrid header style
posted

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

Parents
  • 138253
    Verified Answer
    Offline posted

    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.

Reply Children