WPF Toolkit Charting: Currrenty String Format

May 12, 2010 at 1:31 PM

HI, I have the followoing styles for formatting lables and tooltips content  in the charting.

This one is for the vertical Y axis. It will show the values correctly using the correct currency symbol.
<Style x:Key="VerticalCurrencyLabelStyle" TargetType="chartingToolkit:AxisLabel">
        <Setter Property="StringFormat" Value="{}{0:C0}"/>
However, the following is for the tooltip but the currency symbol is always US dollars $ while it should be £.
               <ContentControl Content="{TemplateBinding DependentValue}" 
                               ContentStringFormat="{} {0:C0}"/>

Any thing I can do to locate the problems?

Mar 4, 2011 at 11:27 PM

This looks like a problem of the Culture-Property.

But I could not found any Culture-Property.

You can try the Language-Property:

<ContentControl Content="{TemplateBinding DependentValue}" ContentStringFormat="{} {0:C0}" Language="en-GB"/>

Mar 8, 2011 at 10:30 AM

Good day!

This problem can easily be solved by just going to tht stack panel and write "xml:lang="en-GB""



<StackPanel xml:lang="en-GB">
 <ContentControl Content="{TemplateBinding DependentValue}"
 ContentStringFormat="{} {0:C0}"/>