Example Silverlight control (embedded):
The TimeLabel control is initialized with the following code:
<sl:TimeLabel x:Name="TimeLabelControl" DisplaySeconds="False" Display12Hour="False"
DisplayAMPM="False" ToolTip="A TimeLabel displaying an exact time" TimeType="Exact"
TimeValue="13:15" />
- DisplayAMPM – specifies whether an AM/PM suffix should be
included
- Display12Hour – specifies whether the hours value should
be displayed in 12-hour or 24-hour format
- DisplaySeconds – specifies whether seconds should be displayed
- 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 times
- TimeType – the time type that represents the time
- TimeValue – the exact or approximate time. It is recommended that
the property TimeValue be used when specifying values in XAML. Example: TimeValue="11:30:20".
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 CuiTime
- ToolTip – the text displayed when the mouse pointer hovers
over the control
- Value – the time to be displayed in the label. The
Value property cannot be initialized in XAML (as with the TimeValue property) due to the
absence of a custom type converter that can convert a string to a valid instance of CuiTime
- DisplayAMPM has a default value of “False”
- Display12Hour has a default value of “False”
- DisplaySeconds has a default value of “False”
- NullIndex has a default value of “-1”
- NullStrings has a default value of an empty list of strings
- TimeType has a default value of “Exact”
- TimeValue has a default value of “Now”
Example WPF control (screenshot):
|
A TimeLabel displaying an exact time.
|
|
A TimeLabel displaying an approximate time.
|
|
A TimeLabel displaying an exact time, including seconds.
|
|
A TimeLabel displaying a null index time.
|
Further information on this control can be found on the Silverlight tab above. 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.
- DisplayAMPM – specifies whether an AM/PM suffix should be
included
- Display12Hour – specifies whether the hours value should
be displayed in 12-hour or 24-hour format
- DisplaySeconds – specifies whether seconds should be displayed
- 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 times
- TimeType – the time type that represents the time
- TimeValue – the exact or approximate time. It is recommended that
the property TimeValue be used when specifying values in XAML. Example: TimeValue="11:30:20".
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 CuiTime
- ToolTip – the text displayed when the mouse pointer hovers
over the control
- Value – the time to be displayed in the label. The
Value property cannot be initialized in XAML (as with the TimeValue property) due to the
absence of a custom type converter that can convert a string to a valid instance of CuiTime
- DisplayAMPM has a default value of “False”
- Display12Hour has a default value of “False”
- DisplaySeconds has a default value of “False”
- NullIndex has a default value of “-1”
- NullStrings has a default value of an empty list of strings
- TimeType has a default value of “Exact”
- TimeValue has a default value of “Now”
Example ASP.NET control (embedded):
|
13:15
|
A TimeLabel displaying an exact time.
|
|
Approx 13:15
|
A TimeLabel displaying an approximate time.
|
|
01:15:00 (pm)
|
A TimeLabel displaying an exact time, including seconds, in 12-hour clock format
with a PM indicator.
|
|
Ongoing
|
A TimeLabel displaying a null index time.
|
The TimeLabel control is initialized with the following code:
<NhsCui:TimeLabel ID="TimeLabel1" TimeValue="13:15" runat="server"/>
- DisplayAMPM – specifies whether an AM/PM suffix should be
included
- Display12Hour – specifies whether the hours value should
be displayed in 12-hour or 24-hour format
- DisplaySeconds – specifies whether seconds should be displayed
- 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 times
- ToolTip – the text displayed when the mouse pointer hovers
over the Web server control
- Value – the time to be displayed in the label
- DisplayAMPM has a default value of “False”
- Display12Hour has a default value of “False”
- DisplaySeconds has a default value of “False”
- NullStrings has a default value of an empty list of strings