Silverlight: United States Map ListBox

Recently, one a Silverlight POC, my team built a Map Area Control. This control constructs a zoom-able, pan-able vector map of geo-political territories. The particular domain we used was the United States. We setup an XML Data File that contains the rendering instructions for each state such as X, Y, Width, Height and Path, then we used Linq—>XML to construct entities from the XML.

<MapArea Description="Idaho" ShortName="ID" Left="107.588" Top="44.55" Width="72.6835" Height="116.451" Path="…"/>

This Map control is really a ListBox that exposes a collection of selected states. The ListBox ItemTemplate consists of a RadioButton that has been re-skinned with a Path that is bound to the properties we pulled from the XML data island.

Map Control

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s