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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

I have implemented two custom themes for use when viewing charts on screen versus printing. Unfortunately, the themes do not contain all necessary color definitions. For example, these are multi-series charts, with each series having a different color. Is there any way to extend the ThemeManager to include these additional required brushes (and of course, be able to bind to those colors from XAML).

Alternatively, if there is a way to bind to existing ThemeManager colors from XAML, i could simply use several existing but otherwise unused ThemeManager brushes for my various series stroke brushes.

Bill

Version
4.2.xx
  • You must to post comments
0
0

Hi William

You can find a list of ThemeManager brushes here: IThemeColorProvider interface.

You can bind to a theme brush by using this code:

<!-- Binds to current theme GridBackground Brush -->
<Setter Property="Background" Value="{me:ThemeBinding GridBackgroundBrush}" />

Alternatively, you can simply specify brushes in styles and place the styles inside SciChartSurface.Resources. These will appear in export as well as on screen.

Hope this helps!

Best regards,
Andrew

  • You must to post comments
0
0

Andrew,
Thanks. The ThemeBinding extension looks like what I need. There are several defined but unused brushes I can choose from.
I use ThemeManager to switch between two custom themes – one for screen display and one for export to file, so having all needed brushes managed by ThemeManager simplifies the process.

What namespace are you assuming “me” maps to?

Bill

  • Andrew
    xmlns:me is … SciChart.Charting.Common.MarkupExtensions
  • You must to post comments
0
0

it appears ThemeBinding only works for brushes. I would like to use it to bind a FastLineRenderableSeries Stroke to a different color in the theme. Is there a way to bind to a Color in a Theme?
Bill

  • Yuriy
    Hi William, ThemeBinding should work fine for Colors. It simply creates a binding inside. In fact, we use it to bind default colors from ThemeColorProvider, such as DefaultCandleUpWickColor, DefaultCandleDownWickColor.
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.