In the code example from the sample you pointed to the SelectionChanged Event returns a Graphic collection (IList) as shown below e.AddedItems.
private void QueryDetailsDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
foreach (Graphic g in e.AddedItems)
g.Select();
foreach (Graphic g in e.RemovedItems)
g.UnSelect();
}
The Graphic object has a Geometry property and your case because you selected points this Geomtry would be a MapPoint object. Something like this below should get the MapPoint you need
private void QueryDetailsDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
//This would work with multiple points being selected
ESRI.ArcGIS.Client.Geometry.PointCollection points = new ESRI.ArcGIS.Client.Geometry.PointCollection();
foreach ( Graphic g in e.AddedItems )
{
MapPoint mapPoint = g.Geometry as MapPoint;
if (mapPoint != null )
{
points.Add(mapPoint);
}
}
MultiPoint multiPoint = new MultiPoint(points);
MyMap.ZoomTo(multiPoint.Extent);
//If you user was only allowed to select a single point it would be something like this
Graphic g = e.AddedItems[0] as Graphic;
MapPoint mapPoint = g.Geometry as MapPoint;
if (mapPoint != null )
{
MyMap.ZoomToResolution(MyMap.Resolution / MyMap.ZoomFactor, mapPoint); //As shown Above
}
foreach (Graphic g in e.RemovedItems)
g.UnSelect();
}
Hope that helps-Joe
Thanks,
-Joe