ImageGlass.ImageBox.RestoreSizeMode C# (CSharp) Method

RestoreSizeMode() protected method

Resets the SizeMode property whilsts retaining the original Zoom.
protected RestoreSizeMode ( ) : void
return void
        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
            }
        }
ImageBox