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
Was able to fix it, seems when the content changes to a different object and then back, the theme isnt used anymore.
Sorry for being inpatience, but i really need to make this work.
When setting the theme to RoyaleVelvet its being shown correctly, but when changing the data underneith (sort of refresh) a part of the theme isnt being shown anymore.
Hello,
I have the same problem and i have read the blog but i cant make it work. I want the chart to have the theme RoyaleVelvet, but when i reference wpf themes i cant find it their, only some primitive stuff.
Can you give an example.
Thanks.
Hi Jim,
You can find more information on this issue here (more specific the second problem). The resolution is to add this style in the chart's resources without setting a key.
Let me know if you have any questions with this matter.