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
875
Problems using a Style to set XamChart.Theme
posted

When I set the Theme property directly for a XamChart, the control is styled properly. However, when I set the Theme property via a Style, I only get portions of the styling: basically just a portion of the background and some of the grid lines. The default colors are used for the foreground and much of the background.

I.e. this works:

        <igCA:XamChart Theme="Luminol" />

But this doesn't work:

        <Grid.Resources>
            <Style x:Key="ChartStyle" TargetType="{x:Type igCA:XamChart}">
                <Setter Property="Theme" Value="Luminol"/>
            </Style>
        </Grid.Resources>

        <igCA:XamChart Style="{StaticResource ChartStyle}" />

Our application is skinned/themed, and we use Styles heavily to do the skinning. So I need to be able to set the XamChart Theme property via a Style. Our styles are stored in loose xaml files instead of within Grid resources as shown here, I just used a simple example here to illustrate the problem.

Please see the image I attached to this post for images illustrating the results.

This looks like a bug to me, but if there is something I'm doing wrong here, please let me know. I've tried using a DynamicResource for the style too, but it still has the same problem.

Thanks!
Jim Honeycutt