Databinding shapes with the Bing Maps control for Silverlight

The March 2009 release of the Virtual Earth control for Silverlight (now known as the bing map control) was a great release. Up until then, projects like Deep Earth were trying to provide us with a way to use deep zoom + the virtual earth tiling to allow us to build Silverlight apps. Now Microsoft have given us an official control to play with.

One of the big downsides of the official control was the lack of databinding. You still had to add / remove your pushpins & shapes manually just like you would with the AJAX version. There is code available on the Microsoft website that adds dependency properties to the Bing Maps control which expose ItemsCollection, ready for you to databind to. If you combine this with some custom datatemplates, you are able to databind directly to the map as you would expect.

Step 1. Install the Bing Maps control

The CTP of the control is available from Microsoft connect https://connect.microsoft.com/silverlightmapcontrolctp

Continue reading