MobileForms Toolkit Documentation

ItemNumeric.DisplayFormat Property

Gets or sets the display format.

public string DisplayFormat {get; set;}

Property Value

String that specifies the display format.

Remarks

If the display format is set, it is used to format the Value to display, when the item is not focused. This is especially usefull when displaying the currency. Format string used is provided to the String.Format method. The "'prefix'{0:'format'}'suffix'" pattern is accepted as a valid format string. If no display format is specified, the Text property is displayed.

Example

The following table demonstrates the usable format strings:

Format stringDescription
""Display format not set, the Text property is displayed.
"{0:P}"You can use standard numeric formats, this format display percentage: 0.161 -> "16.10 %"
"${0:0.00}"You can use also custom numeric formats, this format display currency value: 16.1 -> "$16.10"
"0.00"This usage is incorrect, displays literal text "0.00"

See Also

ItemNumeric Class | Resco.Controls.DetailView Namespace | Format