protected void RestoreSizeMode() { if (SizeMode != ImageBoxSizeMode.Normal) { int previousZoom; previousZoom = Zoom; SizeMode = ImageBoxSizeMode.Normal; Zoom = previousZoom; // Stop the zoom getting reset to 100% before calculating the new zoom } }