MapsTask::Center Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the location that will be used as the center point for the map.
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.
<object> <object.Center> <GeoCoordinate .../> </object.Center> </object>
Property Value
Type: System.Device.Location::GeoCoordinateType: GeoCoordinate. The center point of the map.
If you do not set the Center property before calling Show(), the user’s current location is used. You must set either the Center property or the SearchTerm property before calling Show or an InvalidOperationException will be thrown.
The GeoCoordinate type is found in the System.Device.Location namespace. To use it, you should add a reference to System.Device.dll to your application project and include the following using directive in your code.
using System.Device.Location;