Something like this might help and works:
// If an item has been selected
GraphicsLayer AgraphicsLayer = Map.Layers["MySelectionGraphicsLayer"] as GraphicsLayer;
// graphicsLayer.ClearGraphics();
if (featureSet != null && featureSet.Features.Count > 0)
{
// Show selected feature attributes in DataGrid
foreach (Graphic selectedFeature in featureSet.Features)
{
// Hightlight selected feature
selectedFeature.Symbol = LayoutRoot.Resources["ResultsMarkerSymbol"] as SimpleMarkerSymbol;
AgraphicsLayer.Graphics.Insert(0, selectedFeature);
// Zoom to selected feature (define expand percentage)
ESRI.ArcGIS.Client.Geometry.Envelope selectedFeatureExtent = selectedFeature.Geometry.Extent;
double expandPercentage = 30;
double widthExpand = selectedFeatureExtent.Width * (expandPercentage / 100);
double heightExpand = selectedFeatureExtent.Height * (expandPercentage / 100);
ESRI.ArcGIS.Client.Geometry.Envelope displayExtent = new ESRI.ArcGIS.Client.Geometry.Envelope(
selectedFeatureExtent.XMin - (widthExpand / 2),
selectedFeatureExtent.YMin - (heightExpand / 2),
selectedFeatureExtent.XMax + (widthExpand / 2),
selectedFeatureExtent.YMax + (heightExpand / 2));
Map.ZoomTo(displayExtent);
Map.ZoomTo(new Envelope(displayExtent.XMin + 1.45, displayExtent.YMin + 1.45, displayExtent.XMax - 1.45, displayExtent.YMax - 1.45));
}
ResultsDisplay.IsExpanded = true;
}
MyDrawSurface.IsEnabled = false;
J