Pre loader

Unable to set background color of TextAnnotation (WPF)

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

Hi All!

I have a syncfusion theme (MaterialDark) applied to my WPF app.

Without the theme applied, I can set the background color of a TextAnnotaion in the normal way in bothe XAML and c#, no problem.

When I apply the theme, it overrides this setting and renders the TextAnnotation with a black background and no matter what I try, I

can’t seem to get rid of it.

I have tried:

  1. setting up a Resource dictionary in XAML

  2. setting the style to null and then applying inline style (in both code behind and XAML)

Nothing seems to work!

Has anyone encountered this issue beforew or know of any solutions?

It’s driving me mad!

Version
WPF
  • You must to post comments
0
0

Hi Scott

It’s probably a conflict in a Xaml resource dictionary. However we can’t say what without seeing the code.

Could you post a code sample our engineers can investigate?

  • You must to post comments
0
0

Hi Andrew,

Thanks for coming back to me – not sure how much of the code you need to see, but this is my XAML:

 

 

this works perfectly without the theme applied.

When I apply the syncfusion theme in my MainWindow.xaml, thus:

syncfusionskin:SfSkinManager.VisualStyle=”FluentDark”

the Foreground property still works (I can change it to whatever colour I like) but the background element renders black and whatever I do, I can’t change it.

If you need to see more of the code, let me know.

  • Andrew Burnett-Thompson
    Hi Scott, from the code provided we don’t have enough info to reproduce this problem. Perhaps you can create a small project which reproduces the issue and upload it to github? Best regards, Andrew
  • You must to post comments
0
0

Hi, I posted a reply (twice) hours ago but it doesn’t seem to have appeared?

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies