Pre loader

Adding additional brushes to ThemeManager?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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

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

  • 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 Zadereckiy
    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
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
Showing 3 results
Your Answer

Please first to submit.