SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

0
0

Hi

i use scichart in a usercontrol which can be added by a button to the mainwindow. With a contextmenu i change a property in my ViewModel of the usercontrol.
<UserControl.ContextMenu >
<ContextMenu >
<MenuItem Header="Style">
<ComboBox ItemsSource="{Binding Path=ChartStyleList}" SelectedItem="{Binding Path=SelectedChartStyle}">
</ComboBox>
</MenuItem>
</ContextMenu>
</UserControl.ContextMenu>

this property is also bound to the thememanager property in the xaml code.
<my:SciChartSurface HorizontalAlignment="Stretch" Name="Chart" VerticalAlignment="Stretch" sciChart:ThemeManager.Theme="{Binding Path=SelectedChartStyle}" >

The problem is now that when i change the property of one Usercontrol and so the theme of one scichart the others scicharts also change there theme.
Is this an error in my code or is this supposed to happen?

  • You must to post comments
0
0

Hi Everyone,

This is a side effect of an efficient themeing mechanism we use. In v1.7 we have separate control templates for each theme. However people complained that startup time of the chart was too slow. So in v2.0 what we did was introduce a static ThemeColorProvider and bind to this just for colours, sharing control templates among charts.

This resulted in greater performance but also brought the limitation that themes are now global.

We have been discussing in the team a way to improve this. Yuriy has an idea which may allow fast StartUp and individual (per chart) themes. We’re aware its a limitation for users and it is on our roadmap, albeit at lower priority.

UPDATE 2014:
Setting different themes for different charts on the same view has been implemented in WPF. We are going to extend this behavior to have it in Silverlight as well.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.