O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

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

Panning and Zooming the Map Control

The Map control’s Center property is a GeoCoordinate that is used to retrieve and set the center location of the map view. The following example shows how to set the Center property of a Map control in XAML by providing the latitude and longitude (in that order):

<m:Map Center="45.8, 6.15" />

The Center property can also be data bound, as shown in the following example:

<m:Map Center="{Binding Center, Mode=TwoWay}" />

By using a TwoWay data binding, you can track the current center point of the map from your viewmodel.

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