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
1830
Style Summary As Header
posted

I've added a summary record to one of my grids, binding the background to the convenient HeaderAreaBackground property, and although the text is only white, I'd like a way to bind the foreground as well.  Is there a better way without replicating the themed header styling (Onyx) I'm using?


<Style TargetType="igDP:SummaryRecordPresenter">

    <Setter Property="Background" Value="{Binding HeaderAreaBackground, RelativeSource={RelativeSource Self}}"/>

    <Setter Property="Foreground" Value="#fff"/>

</Style>

Parents
  • 17475
    Offline posted

    Hello Darryl, 

    I have been looking into your post. If you are trying to set the Foreground property of the SummaryRecordPresenter when you are using the Onyx theme for the XamDataGrid, you could set the BasedOn property for the SummaryRecordPresenter style:

    <igDP:XamDataGrid.Resources>

                    <Style TargetType="igDP:SummaryRecordPresenter" BasedOn="{x:Static igThemes:DataPresenterOnyx.SummaryRecordPresenter}">

                        <Setter Property="Background"

                        Value="{Binding HeaderAreaBackground, RelativeSource={RelativeSource Self}}"/>

                        <Setter Property="Foreground"

                        Value="#fff"/>

                       

                    </Style>

                </igDP:XamDataGrid.Resources>

    This will allow you easily to apply a style for the component when you are using a theme.

    Please feel free to let me know if I have misunderstood something in your scenario or if you have any questions on the matter.

Reply Children