Decimal separator - How to change

Hi,

I was wondering if there is a way to change whether numbers should be comma (,) separated or point separated (.)?

I wish the document was always “default” points separated, so my code does not conflict with countries where one uses comma as decimal separates.

I am coding some Equations, and depending on the country some instructions should either be comma seperated or semicolon seperated…

See link for more information (or the attached Image).


I hope that if the default separator is set to one value (regardless of the location of users) I could get around this issue and my App could be used all over the world.

Thanks in advance!

Hi,

I found an alternative solution. One can just set the CultureInfo for the entire WPF application to a default Country/Region:

CultureInfo.CurrentCulture = new CultureInfo("en-US");

By doing so all decimals will be point separated (.) instead of my country’s default comma (,) separator.

Perhaps another one got a solution where one can change it within the GemBox.Document environment instead of my global solution?

Hi Steffen,

I’m afraid that this cannot be specified on a document level, only on a global level.

You see, even though you can specify culture in the document using the CharacterFormat.Language property, it won’t have any effect on the resulting equation.

Regards,
Mario