I apply a text style for numeric data that has the .NumericFormat property set to "{0:F0}". In 5.5.33, I get a map that displays values as expected... values of 2, 4, 5, etc are displayed as "2", "4", and "5". But in 5.5.160, these same values are displayed as "{0:F2}", "{0:F4}", and "{0:F5}". Has something changed with the way the .NumericFormat property works? Or is this a bug?
No. That will not be easy. But if you have any numeric layer, create a text style label for it to display a feature value such as Population, area, objectID, whatever. Set the TextStyle.NumericFormat = "{0:F0}". You will see the label printed as this format, with the last zero replaced by the text value, as shown in the second illustration.
Today, I have learned that if you set the TextStyle.NumericFormat = "{0:F2}", you will see the leading zero replaced, creating a label of "{4:F2}" for the upper left label.
This is leading me to believe you have done something with the NumericFormat to allow multiple feature values to be embedded within a single text string, or something. Has the use of NumericFormat changed since the initial 5.5.0 release?
I have confirmed that I can use "F2" instead of "{0:F2}" and it works. I've modified my code. But I agree with Ryan... something changed on this that broke the original behavior.
We should have make it the current way at the beginning as that is the real format strings while "{0}" is just the parameter index. I am very sorry for the inconvenience that it broke the original behavior.