HI, most likely it's caused by AxMap.ZoomBehavior = zbUseTileLevels, which is set by default. It adjusts extents to the closest tile level. In theory it can only expand the extents, but apparently we have a bug there (those calculations are quite tricky).
To solve this you can:
a) call AxMap.ZoomOut() after zooming (optionally call AxMap.LockWindow to make it look like a single zoom);
b) set AxMap.ZoomBehavior = zbDefault and add more padding after zooming by expanding AxMap.Extents;
Unfortunately AxMap.ZoomToSelected doesn't use AxMap.ExtentPad property - it would be easier to handle it that way, I'll add its support in the next release.
Regards,
Sergei
To solve this you can:
a) call AxMap.ZoomOut() after zooming (optionally call AxMap.LockWindow to make it look like a single zoom);
b) set AxMap.ZoomBehavior = zbDefault and add more padding after zooming by expanding AxMap.Extents;
var ext = AxMap.Extents;
ext.GetBounds(...);
var extNew = new Extents();
extNew.SetBounds(...); // larger extents
axMap1.Extents = extNew;
c) calculate extents of selected shapes yourself and add enough padding. Unfortunately AxMap.ZoomToSelected doesn't use AxMap.ExtentPad property - it would be easier to handle it that way, I'll add its support in the next release.
Regards,
Sergei