Skip to main content

RangeControlClientBase.LabelFormatString Property

Gets or sets the string used to format ruler values.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Behavior")]
public virtual string LabelFormatString { get; set; }

Property Value

Type Description
String

A string used to format ruler values.

Remarks

The format string is specified in the following form:

{0[,alignment][:formatString]}

Below is a quote from the Composite Formatting topic in MSDN that describes this syntax:

“The optional alignment component is a signed integer indicating the preferred formatted field width. If the value of alignment is less than the length of the formatted string, alignment is ignored and the length of the formatted string is used as the field width. The formatted data in the field is right-aligned if alignment is positive, and left-aligned if alignment is negative. If padding is necessary, white space is used. The comma is required if alignment is specified.”

“The optional formatString component consists of standard or custom format specifiers. If formatString is not specified, the general (“G”) format specifier is used. The colon is required if formatString is specified.” See the Format Specifiers topic for a list of the most used specifiers used to format numeric and date/time values.

You can refer to MSDN for more details on the Composite Formatting feature.

See Also