Pre loader

Tag: labeltextformatting

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 votes
6k views

Dear all,
I need to display an annotation label based on regional settings, especially grouping separator.

The annotation is define as below :

<s:HorizontalLineAnnotation x:Name="_threshold" HorizontalAlignment="Stretch"
                                        LabelPlacement="Axis" 
                                        ShowLabel="True"
                                        Y1="{Binding LiveThreshold,Mode=TwoWay}" 
                                        />

If I check the row value LiveThreshold it is properly formatting according to regional setting and if we display it in another windows control through binding all is ok ans seen as 1,234 (“,” as grouping separator).

But when we apply that value to Y1 to the Annotation above, the result I get is a value which is not using the format of the value it self but overwrite it and for instance Grouping digit separator is completely ignore from regional seetings and display as : 1234

Q1 : Why the Annotation is not using the actually formatted string that I am delivering ?

I have try to add the LabelTextFormatting =”n” property. If I am in English Us in regional settings, then it display correctly then the Digit grouping as 1,234 .

But if I switch for instance to French in regional settings, then there is no digital grouping in French formatting so return data should be 1234. Instead I have an exception of “Input string is not a valid format” , which is wrong because the raw data value is correctly formed.

Q2 : Why adding the LabelTextFormatting =”n” crash in other language than US where digital grouping is different than “,” ?

Does anyone have met this case ?

Thanks for tips if any

  • sc sc asked 6 years ago
  • last active 6 years ago
Showing 1 result