I guess there is an issue becasue PanTo and ZoomTo are asynchronous functions (with animations), so executing bothh in // may be an issue.Here is an example of function panning and zooming with only one call: private void centerAndZoom(ESRI.ArcGIS.Client.Map map, ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint, double resolution)
{
double ratio = 1.0;
if (map.Resolution != 0.0)
ratio = resolution / map.Resolution;
if (ratio == 1.0)
map.PanTo(mapPoint);
else
{
ESRI.ArcGIS.Client.Geometry.MapPoint mapCenter = map.Extent.GetCenter();
double X = (mapPoint.X - ratio * mapCenter.X) / (1 - ratio);
double Y = (mapPoint.Y - ratio * mapCenter.Y) / (1 - ratio);
map.ZoomToResolution(resolution, new ESRI.ArcGIS.Client.Geometry.MapPoint(X, Y));
}
}
Note : it's using Map.Resolution but might easily be adpated to use Map.Scale.