Example ASP.NET control (embedded):
06-Jan-2009
A DateLabel displaying an exact date.
The DateLabel control is initialized with the following code:
<NhsCui:DateLabel ID="DateLabel1" runat="server"/>
- DateType – the date type that represents the date
- DateValue – the exact or approximate date
- DisplayDateAsText – specifies whether the text “Today”,
“Tomorrow” or “Yesterday” should be displayed in place of
the date
- DisplayDayOfWeek – specifies whether the name of the day
is displayed with the date
- Month – the month; this is not a reflection of the month
of the DateValue and is only relevant if DateType is DateType.YearMonth
- NullIndex – a number identifying a null type where the index
has no meaning in and of itself; the meaning is implied by the NullStrings property
- NullStrings – a list of localized strings that identify different
types of null index dates
- Value – gets or sets the date to be displayed in the label
- Year – the year; this is not a reflection of the year of
the DateValue and is only relevant if DateType is DateType.Year
- DateType has a default value of “Exact”
- DateValue has a default value of “Now”
- DisplayDateAsText has a default value of “False”
- DisplayDayOfWeek has a default value of “False”
- Month has a default value of “1”
- NullIndex has a default value of “-1”
- NullStrings has a default value of an empty list of strings
- Year has a default value of “1”
Example WinForms control (screenshot):
A DateLabel displaying an exact date.
Further information on this control, and the full source code, can be found in the
Microsoft Health Common User Interface Toolkit, which can be downloaded from our
CodePlex site.