Pre loader

Apply theme to all SciChartSufaces

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


The ThemeManager has a SetTheme method that requires me to provide the dependency object of the thing I want to se the theme for. However, is there a way to set the theme in the ThemeManager and have it apply to all instances of SciChartSurfaces in the application?

  • You must to post comments

Hi James

Yes of course, you can do this via implicit styles.

Try this:

<Style TargetType="s:SciChartSurface">
     <Setter Property="s:ThemeManager.Theme" Value="ExpressionDark"/>

Put this code in your App.xaml or in a resource dictionary and it will be applied to all SciChartSurfaces in the application.

NOTE: There are sometimes caveats where implicit styles are not applied to dependency objects. You need to check that the style is applied and if not try another technique, to have a named style:

// Add this named style to App.xaml
<Style TargetType="s:SciChartSurface" x:Key="GlobalSciChartStyle">
     <Setter Property="s:ThemeManager.Theme" Value="ExpressionDark"/>

// Then in your files
<s:SciChartSurface Style="{StaticResource GlobalSciChartStyle}">

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.