Example Silverlight control (embedded):
The AddressLabel control is initialized with the following code:
<sl:AddressLabel Address1="98 Andover Place" Town="Reading" County="Berkshire" Postcode="rg3 5ap"
AddressDisplayFormat="InForm" Width="200" FontFamily="Verdana" FontSize="14"
FontWeight="Bold" HorizontalAlignment="Left"/>
- Address1 – gets or sets the first line of an address
- Address2 – gets or sets the second line of an address
- Address3 – gets or sets the third line of an address
- Town – gets or sets the town in an address
- County – gets or sets the county in an address
- Postcode – gets or sets the postcode
- Country – gets or sets the country in an address
- AddressDisplayFormat – gets or sets the address layout to
be either in-form (vertical) or in-line (horizontal)
- All stored address data should display. However, if an address element is empty,
it will not display. For example, in the code sample above, the Country property
is not defined and so is not displayed in the AddressLabel
- The Postcode property should always display in capitalized form and as the final
element before the Country property
Example WPF control (screenshot):
|
The AddressLabel using the in-form (vertical) layout format.
|
|
The AddressLabel using the in-line (horizontal) layout format.
|
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.
Example ASP.NET control (embedded):
Usual address - 98 Andover Place
- Reading
- Berkshire
- RG3 5AP
|
The AddressLabel using the in-form (vertical) layout format.
|
|
Usual address 98 Andover Place, Reading, Berkshire, RG3 5AP
|
The AddressLabel using the in-line (horizontal) layout format.
|
The AddressLabel control is initialized with the following code:
<NhsCui:AddressLabel ID="AddressLabel1" runat="server"
Address1="98 Andover Place"
Town="Reading" County="Berkshire" Postcode="RG3 5AP"
AddressDisplayFormat="InForm" CssClass="AddressLabel" AddressTypeStyle="Label"
Font-Bold="true" />
- Address1 – gets or sets the first line of an address
- Address2 – gets or sets the second line of an address
- Address3 – gets or sets the third line of an address
- Town – gets or sets the town in an address
- County – gets or sets the county in an address
- Postcode – gets or sets the postcode
- Country – gets or sets the country in an address
- AddressDisplayFormat – gets or sets the address layout to
be either in-form (vertical) or in-line (horizontal)
- AddressType – gets or sets the address type; defaults to
“Usual address”
- AddressTypeStyle – gets the CSS that is to be applied to
the address label
- All stored address data should display. However, if an address element is empty,
it will not display. For example, in the code sample above, the Country property
is not defined and so is not displayed in the AddressLabel
- The Postcode property should always display in capitalized form and as the final
element before the Country property
Example WinForms control (screenshot):
|
The AddressLabel using the in-form (vertical) layout format.
|
|
The AddressLabel using the in-line (horizontal) layout format.
|
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.