This project has moved and is read-only. For the latest updates, please go here.

MapBox size changes - map remains unchanged

Topics: SharpMap v0.9 / v1.x, WinForms Controls
Jun 24, 2011 at 9:50 PM

Hi All!

I have a mapbox on my form in a tablalayout panel. Mapbox  isdocked in fill mode to tablaleyout panel. TableLayoutpanel is fill docked to a splitcontainer panel. When form resizes, mapbox resizes too, but the map itself stays unchanged. Check out my screenshot, this area was symbolized by red:

After zooming or pan it will be okkey (re-fit) again.

Which event should be handled to refresh the map size itself to fit? And how?
Or which property should be set?

Thx a lot!

(WinForms/.Net4/C#/VS 2010)

Jun 24, 2011 at 10:12 PM

Now I handle MapBox.Resize event and call MapBox.Refresh(), but I wonder if it is an 'expensive' solution. Hope there is a better one.