I have a map with a specific layer that I want my users to be able to reset the extent to. So I basically added a little button that on the click event has this: GraphicsLayer l = (GraphicsLayer)this.map1.Layers["MY_LAYER_ID"]; this.map1.Extent = l.FullExtent;
That works fine as long as the window is Maximized. If the window that holds the map is in any other size then it only shows whatever part of the viewing area is shown at that moment. What I'd like to happen is that the map resets to the extent the layer has but that the layer in question if shown entirely in the current viewing area. Is there an example of that somewhere? How can I accomplish this?Thanks!