I am trying to zoom to the results of a query which is added to my map as a graphics layer. I have been trying numerous ways to get the map to zoom to that layer but can't get it to work. Once the layer is added I have no issues with using the Go To buton to zoom into the layer. I am missing something but I am not sure what. Here is a sample of one way I was trying to accomplish this.
string layerID = "Policy";
Layer zoomlayer = MapApplication.Current.Map.Layers[layerID];
MapApplication.Current.Map.ZoomTo(zoomlayer.FullExtent.Extent);