Skip to main content

IMajorTickmark.FormatString Property

Gets or sets the format string used to format values of major tickmarks.

Namespace: DevExpress.XtraGauges.Core.Model

Assembly: DevExpress.XtraGauges.v23.2.Core.dll

NuGet Package: DevExpress.Gauges.Core

Declaration

string FormatString { get; set; }

Property Value

Type Description
String

A string used to format values of major tickmarks.

Remarks

A format pattern can contain any custom text. To insert a formatted value at any position within this text, use the “{0}” or “{1}” placeholder. The “{0}” placeholder corresponds to a tickmark’s value, while the “{1}” placeholder corresponds to the matching percentage value.

The complete syntax to define the position of the value is as follows:

{0[:formatString]}

or

{1[:formatString]}

where the formatString parameter is a standard or custom format specifier. See the Numeric Format Strings topic in MSDN, to learn about these specifiers.

An example of a format string is “{0:F2}”. This string presents tickmark values in the form “…ddd.dd” where each ‘d’ indicates a digit (0-9). The string starts with a minus sign if the number is negative.

See Also