Please help to provide a tutorial example to implement IThemeProvider interface in order to make a custom theme.
Thanks,
Tanmay
- Tanmay Gupta asked 10 years ago
- You must login to post comments
Hi Tanmay,
Thanks for your inquiry. Actually, we are going to introduce the capability to add custom themes in SciChart v3.2.
In the meantime, there is a workaround to customize themes now. You need to call ThemeManager.GetThemeProvider and get the ThemeColorProvider for a particular theme and just apply your desired values. Please, take a look at the following code:
// Pass "" or "ExpressionDark" to change the color scheme of the default theme.
// To change schemes of the other standard themes, pass in corresponding name.
ThemeColorProvider tcp = ThemeManager.GetThemeProvider("");
tcp.GridBackgroundBrush = Brushes.White;
tcp.GridBorderBrush = App.ColorToBrushConverter("#FFF0F0F0");
tcp.SciChartBackground = Brushes.White;
tcp.MajorGridLinesBrush = App.ColorToBrushConverter("#FFF0F0F0");
tcp.MinorGridLinesBrush = App.ColorToBrushConverter("#FFF0F0F0");
tcp.TickTextBrush = App.ColorToBrushConverter("#FF818181");
tcp.RolloverLineStroke = App.ColorToBrushConverter("#A49CA9B6");
tcp.DefaultAxisMarkerAnnotationBackground = Brushes.Black;
tcp.DefaultAxisMarkerAnnotationForeground = Brushes.White;
UPDATE Nov 2014
We now have a ThemeProvider example over at the article titled How to Create a Custom Theme for SciChart
Hope this helps!
- Andrew Burnett-Thompson answered 10 years ago
- last edited 9 years ago
-
What is 'app' in this example?
-
It doesn't matter. basically you need to assign a SolidColorBrush to GridBorderBrush with hex code equal to #FFF0F0F0 (etc)... hope that helps :)
- You must login to post comments
Please login first to submit.