I'd like to prevent the GdPicture viewer from zooming smaller than the viewer size itself (for TIFF and PDF). Zooming in should be allowed, but zooming out should be stopped when the image is fully visible. So I am calculating the minimum allowed zoom factor for the image and comparing it to the actual zoom factor in the AfterZoomChange event. If it is smaller than my minium zoom factor, I set it back to minimum:
Code: Select all
private void ctlDocumentViewer_AfterZoomChange()
{
// Calculate minZoom for current document ...
if (gdViewer1.Zoom < minZoom)
gdViewer1.Zoom = minZoom;
}
Thanks!