Version

DisplayFormat Property

Returns or sets the string used to format the intervals within the control.
Syntax
'Declaration
 
Public Property DisplayFormat As String
public string DisplayFormat {get; set;}
Remarks

The DisplayFormat and ToolTipFormat properties accept a DateTime format string that is used to generate the text for the header (i.e. the text within the Infragistics.Controls.Schedules.Primitives.TimescaleIntervalPresenter) and the tooltip respectively. In addition to the .Net DateTime format strings, the value can also include additional custom replacement tags.

The following values represent the replaceable tokens that may be used and will be replaced prior to formatting the DateTime with the date's ToString method.

Replacement Tag Description
{d:n}
{day:n}
Inserts a substring of the full day name for the date. n indicates the number of characters that should be displayed. For example, '{d:2}' for Sunday would result in "Su".
{m:n}
{mon:n}
Inserts a substring of the full month name for the date. n indicates the number of characters that should be displayed. For example, '{m:2}' for September would result in "Se".
{doyn}
{DOYn}
Inserts the day of the year for the date. n is optional and indicates the minimum number of digits in the resulting string. For example, '{doy3}' for January 2nd would result in "002".
{wn}
{Wn}
Inserts the week number for the date. n is optional and indicates the minimum number of digits in the resulting string. For example, '{w2}' for the first week of the year would result in "01" but '{w}' would result in "1".
{tom}
{TOM}
Inserts a string identifying the third of the month that contains the date. The upper case '{TOM}' indicates that the full version - e.g. "Beginning", "Middle" or "End" - should be used. Lower case indicates the short version - e.g. "B", "M" or "E" - should be used. For example, '{tom}' January 15 would result in "M" but '{TOM}' would result in "Middle".
{q}
{Q}
Inserts a string identifying the quarter of the year that contains the date. The upper case '{Q}' indicates that the full version - e.g. "1st", "2nd", "3rd" or "4th" - should be used. Lower case indicates the short version - e.g. "1", "2", "3" or "4" - should be used. For example, '{q}' January 15 would result in "1" but '{Q}' would result in "1st".
{hy}
{HY}
Inserts a string identifying the half of the year that contains the date. The upper case '{HY}' indicates that the full version - e.g. "1st" or "2nd" - should be used. Lower case indicates the short version - e.g. "1" or "2" - should be used. For example, '{hy}' January 15 would result in "1" but '{HY}' would result in "1st".
{start:un}
{finish:un}
Inserts the difference between the start or finish date and the date for the interval in the specified units. u indicates the units in which the difference will be expressed and includes values of m, h, d, w, tom, M, q, hy and y which represents minutes, hours, days, weeks, thirds of a month, months, quarters, half years and years respectively. n is optional and indicates the number of characters that should be displayed. For example, '{start:d}' would display a string containing the number of days between the interval and the start (e.g. project start).

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also