Creating the Map: WPF Bing Map Part 2


Now start a new wpf project in visual studio. I am using c#, but most of this is easy to transfer over to vb. Once you have downloaded the map control you must reference in in visual studio.  To do that you right click on References in Solution Explorer  and select add reference.  Then select the path (using browse), to where you installed the control.   Then of course you’ll need to add; using Microsoft.Maps.MapControl.WPF; to your c# sharp code and xmlns:m=”clr-namespace:Microsoft.Maps.MapControl.WPF; assembly=Microsoft.Maps.MapControl.WPF” to the xaml code.

Adding the map is then as simple as adding the xaml code:

<m:Map x:Name=”myMap” CredentialsProvider=”Put You Key Here” Mode=”Road” Center=”35.665600,-95.469700″ ZoomLevel=”3″>

This will add a map to your wpf window. In part 3 we add data to our map, using the default pushpins.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s