Example Silverlight control (embedded):
A DateLabel displaying an exact date.
The DateLabel control is initialized with the following code:
<sl:DateLabel Name="DateLabel1" ToolTip="A DateLabel displaying an exact date" />
- DateType – the date type that represents the date
- DateValue – the exact or approximate date. It is recommended that
the property DateValue be used when specifying values in XAML. Example: DateValue="11/11/2008".
The Value property cannot be initialized in this manner due to the absence of a custom type
converter that can convert a string to a valid instance of CuiDate
- 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. The
Value property cannot be initialized in XAML (as with the DateValue property) due to the
absence of a custom type converter that can convert a string to a valid instance of CuiDate
- 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 “0”
Example WPF control (screenshot):
A DateLabel displaying an exact date.
The full source code for this control can be found in the
Microsoft Health Common User Interface Toolkit, which can be downloaded from our
CodePlex
site.
- DateType – the date type that represents the date
- DateValue – the exact or approximate date. It is recommended that
the property DateValue be used when specifying values in XAML. Example: DateValue="11/11/2008".
The Value property cannot be initialized in this manner due to the absence of a custom type converter
that can convert a string to a valid instance of CuiDate
- 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. The
Value property cannot be initialized in XAML (as with the DateValue property) due to the
absence of a custom type converter that can convert a string to a valid instance of CuiDate
- 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 “0”
Example ASP.NET control (embedded):
31-Jul-2010
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”