O'Reilly logo

Microsoft Silverlight 4 Business Application Development Beginner's Guide by Frank LaVigne, Cameron Albert

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - taking control of the Map control

Let's change the map so that it starts out somewhere more relevant to our client.

  1. Return to the CakeORamaLocations solution in Visual Studio.
  2. Add a Center attribute to the Map node, so that it now looks like this:
    <map:Map Center="39.04801,-76.84817" CredentialsProvider="[Bing Maps Account Key]" />
    
  3. Run the solution and you'll see that we've changed the initial location of the map, but we're still zoomed out:
    Time for action - taking control of the Map control
  4. Close the browser window and return to the MainPage.xaml file in Visual Studio.
  5. We can also set the initial zoom level on the map control by adding a ZoomLevel attribute to out map like so:
    <map:Map ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required