I am trying to use specific cultures to format the axis labels of NumericXAxis and NumericYAxis. This is being done in C# code.
I can set the format string to something like:
xaxis.Label = "{0:C}";
The problem is that it will use the system locale to format the currency, and I want it to use a specific locale from a CultureInfo object. How can I do that?
I am using WPF v18.1.
www.infragistics.com/.../datachart-axis-label-format
Hello Walter,
Thank you for contacting Infragistics!
You can see this blog about Changing Culture in WPF. It goes over what you have to do to change the culture for the application so it does not use the system culture.
That's not going to work. I only want to change the culture for the axis, not the whole application.
Thank you for the update. There isn’t a way to change the culture on just the control or the axis. Instead what you could do if you only want to display one currency type is format the label to do only that, for example:
Label="${0:n}"
As the “$” is on the outside it will not affect the format. Then the “n” formats it as a number with two decimal places.