Select to view content in your preferred language

maintain map extent through container resize

2509
1
04-05-2010 10:01 AM
KlayWilliams
New Contributor
Hi all,

I have a map control inside a container which resizes with the browser window.  I'd like for the map extent to change such that the extent visible before the resize is the same after the resize.  I understand that aspect ratio can change--that's fine.

I've got this working when you make the browser smaller--that was trivial, since the map control automatically changes its zoom resolution so that the full extent appears on the map.  But if you then make the browser larger, it just pads the extent around the edges and keeps the zoom resolution the same.

Any ideas?
0 Kudos
1 Reply
dotMorten_esri
Esri Notable Contributor
Simply add the "MaintainExtentBehavor" to the map control. This is easiest done in Blend. Find the behavior in the assets tab, and drag it onto the map.
0 Kudos