Value Formatter
The Value Formatter specifies how a numeric value should be displayed on panel.
Value Formatter |
Applies to Int32 |
Applies to Double |
Description |
Example |
Integer Digits “D” or “d” |
Yes |
- |
Result: Integer digits with optional negative sign. Precision specifier: Minimum number of digits. Default precision specifier: Minimum number of digits required. |
1234 ("D") → 1234 -1234 ("D6") → -001234 |
Hexadecimal "X" or "x" |
Yes |
- |
Result: A hexadecimal string. Precision specifier: Number of digits in the result string. |
255 ("X") -> FF -1 ("x") -> ff 255 ("x4") -> 00ff -1 ("X4") -> 00FF |
Exponential "E" or "e" |
Yes |
Yes |
Result: Exponential notation. Precision specifier: Number of decimal digits. Default precision specifier: 6. |
1052.0329112756 ("E", en-US) -> 1.052033E+003 1052.0329112756 ("e", fr-FR) -> 1,052033e+003 -1052.0329112756 ("e2", en-US) -> -1.05e+003 -1052.0329112756 ("E2", fr_FR) -> -1,05E+003 |
Decimal Precision "F" or "f" |
Yes |
Yes |
Result: Integral and decimal digits with optional negative sign. Precision specifier: Number of decimal digits. |
1234.567 ("F", en-US) -> 1234.57 1234.567 ("F", de-DE) -> 1234,57 1234 ("F1", en-US) -> 1234.0 1234 ("F1", de-DE) -> 1234,0 -1234.56 ("F4", en-US) -> -1234.5600 -1234.56 ("F4", de-DE) -> -1234,5600 |
General "G" or "g" |
Yes |
Yes |
Result: The more compact of either fixed-point or scientific notation. Precision specifier: Number of significant digits. Default precision specifier: Depends on type. |
-123.456 ("G", en-US) -> -123.456 -123.456 ("G", sv-SE) -> -123,456 123.4546 ("G4", en-US) -> 123.5 123.4546 ("G4", sv-SE) -> 123,5 -1.234567890e-25 ("G", en-US) -> -1.23456789E-25 -1.234567890e-25 ("G", sv-SE) -> -1,23456789E-25 |
Percent "P" or "p" |
Yes |
Yes |
Result: Number multiplied by 100 and displayed with a percent symbol. Precision specifier: Desired number of decimal places. |
1 ("P", en-US) -> 100.00 % 1 ("P", fr-FR) -> 100,00 % -0.39678 ("P1", en-US) -> -39.7 % -0.39678 ("P1", fr-FR) -> -39,7 % |