Abstract base class for number formatters.
Inheritance Hierarchy
Spotfire.Dxp.Data.FormattersDataFormatterBase
Spotfire.Dxp.Data.FormattersNumberFormatter
Namespace: Spotfire.Dxp.Data.Formatters
Assembly: Spotfire.Dxp.Data (in Spotfire.Dxp.Data.dll) Version: 69.0.21424.2902 (69.0.21424.2902)
Syntax
C#
[SerializableAttribute] [PersistenceVersionAttribute(63, 0)] public abstract class NumberFormatter : DataFormatterBase
The NumberFormatter type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| NumberFormatter |
Initializes a new instance of the NumberFormatter class.
|
Properties
| Name | Description | |
|---|---|---|
| Category |
Gets or sets the NumberFormatCategory.
| |
| CultureInfo |
Gets or sets a CultureInfo object that defines the
default formatting.
(Inherited from DataFormatterBase.) | |
| CultureName |
Gets or sets the name of the culture that defines the default formatting.
(Inherited from DataFormatterBase.) | |
| CurrencyCulture |
Gets or sets a culture that defines the
currency formatting. The following properties are used:
CurrencySymbol and
CurrencyPositivePattern.
| |
| CurrencyCultureName |
Gets or sets the name of the culture that defines the currency formatting.
| |
| DecimalDigits |
Gets or sets the number of decimal digits.
If not explicitly set, a default value is returned according to
the current Category:
General: -1 (not applicable)Number:
CultureInfo.NumberFormat.NumberDecimalDigitsCurrency:
CultureInfo.NumberFormat.CurrencyDecimalDigitsPercentage:
CultureInfo.NumberFormat.PercentDecimalDigitsScientific: 6 Custom: -1 (not applicable) | |
| DecimalDigitsMode | Gets or sets a value indicating how decimal digits should be handled.
DecimalDigitsMode.
| |
| EmptyString |
Gets or sets the string used to indicate empty values.
(FormatInvalid(String)).
(Inherited from DataFormatterBase.) | |
| ExactParse | Gets or sets a value indicating whether
the format of the string representation must match the
specified format exactly or not. Default is false.
(Inherited from DataFormatterBase.) | |
| FormatInfo |
Gets the number formatting according to the current
configuration of the DecimalDigits,
GroupSeparatorEnabled, NegativePattern
and CurrencyCulture properties.
| |
| FormatString |
Gets or sets a format string that defines how values are formatted.
| |
| GroupSeparatorEnabled |
Gets or sets a value indicating whether the group separator is enabled or not.
| |
| IsLocalized |
Gets a value indicating whether this formatter is localized and always
uses CultureInfo derived from the current running thread or not.
(Inherited from DataFormatterBase.) | |
| IsReadOnly | Gets a value indicating whether the formatter is read-only or not.
(Inherited from DataFormatterBase.) | |
| NegativePattern |
Gets or sets the NumberFormatNegativePattern.
| |
| NumberStyles |
Gets or sets a NumberStyles object that defines
how string representations are parsed.
| |
| ShortFormattingEnabled | Gets or sets a value indicating whether or not short number formatting should be used.
| |
| ShortFormattingSymbolScheme | Gets or sets the symbol scheme to use for short number formatting.
| |
| UseEngineeringNotation |
Gets or sets a value indicating whether or not engineering notation
should be used, which rounds the exponent in scientific formatting
to a multiple of 3.
The default value is false.
|
Methods
| Name | Description | |
|---|---|---|
| CheckReadOnly |
Throws InvalidOperationException if the formatter is
read-only. Do this check before setting a property.
(Inherited from DataFormatterBase.) | |
| Clone |
Returns a writable copy of this formatter.
(Inherited from DataFormatterBase.) | |
| Equals |
Determines whether the specified Object is equal to the current Object.
(Overrides DataFormatterBaseEquals(Object).) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| Format |
Override this method to convert an object to a string value.
(Inherited from DataFormatterBase.) | |
| FormatInvalid |
Formats an invalid value. If error is not null,
the return value includes the "(error)" string, otherwise
EmptyString is returned.
(Inherited from DataFormatterBase.) | |
| GetHashCode |
Gets a hash code for the current Object.
(Overrides DataFormatterBaseGetHashCode.) | |
| GetObjectData |
Populates a SerializationInfo with the data needed to serialize the target object.
(Overrides DataFormatterBaseGetObjectData(SerializationInfo, StreamingContext).) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| Parse |
Override this method to convert a string value to an object.
(Inherited from DataFormatterBase.) | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) | |
| TryParse |
Converts a string representation to an object. A return value indicates
whether the conversion succeeded or failed.
(Inherited from DataFormatterBase.) |
Version Information
Supported in: 14.7, 14.6, 14.5, 14.4, 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also