I have a .NET application dependent on ArcGIS 9.3.1 which I am upgrading to ArcGIS 10.
I have an AxMapControl sat in a panel in a split container on a tab. The Dockstyle
is set to Fill
.
Since upgrading to ArcGIS 10 from 9.3.1, the painting of the map inside the map control has become inconsistent.
The initial size of the map as painted is 'wrong' and the map ends up only filling, say, half the panel, and a second vertical scrollbar appears beside the map. This second scrollbar is a glitch; you cannot use it, and it is eventually painted over. The issue with the the map seems to be painting only: all other information presented (for example in the legend) is as if the map were painted correctly across the whole panel.
After a few operations (such as zooming in/out etc.) the map painting seems to 'catch up' and the map is painted correctly, filling the whole panel. This 'catching up' seems to get faster each time I run the application which leads me to suspect some sort of timing or caching issue.
There is no consistency about when the problem manifests. Sometimes adjusting the screen resolution affects it, other times not.
This seems to be a problem internal to the control. Does anyone have a workaround (other than reverting to the 9.3.1 DLLS)?
UPDATE: I have tried the following without success:
- Setting the dock property of the mapcontrol to fill (http://forums.esri.com/Thread.asp?c=159&f=1707&t=209034#631591)
- Manually resizing in the resize event of the mapcontrol
- Deactivating and reactivating the ActiveView
- Swapping the map layers around
- Forcing lots of Full Refreshes
- Invalidating the map