This class represents scrollable viewport web control.
Namespace:
Aurigma.GraphicsMill.AjaxControls
Assembly:
Aurigma.GraphicsMill.AjaxControls (in Aurigma.GraphicsMill.AjaxControls.dll)
public class BitmapViewer : BaseViewer, ICallBackDataHandler
This class is intended to display the image represented by the Bitmap object through the web. It allows zooming and scrolling the displayed image. Also, you can add a rubberband rectangle (e.g. use it to select a portion of the image).
You can display a low-resolution preview image while the high-resolution fragment of image is loaded. To do it, set true to the PreviewImageEnabled property. When preview image is generated, its width and height is divided by the value stored in the PreviewImageResizeRatio property. This image is downloaded to the browser entirely and stretched at the container. After that high-resolution portion of the image is downloaded to the client and displayed in the viewport. This way user can preview (with very poor quality though) the portion of the image, and he can scroll to the necessary position on the image before high resolution fragment is loaded.
You can add a rubberband control at this bitmap. To do it, drag the rubberband control (e.g. RectangleRubberband) to the form and set its ID to the Rubberband property.
This control allows you zooming the displayed image. It can be done either manually or automatically. To zoom the image manually, you should specify the zooming coefficient through the Zoom property. If it is larger than 1, image is zoomed in, if smaller than 1 - zoomed out. Zoom = 1 means actual size.
To zoom the image automatically you can use the ZoomMode property. If it has other value than None, the zoom factor is calculated automatically. Depending on the mode, it can zoom image to fit it at the control without scroll bars (BestFit), zoom it to eliminate the horizontal scroll bar (FitToWidth), etc.
Alternatively you can use some of zooming navigator classes. To do it, drag ZoomInNavigator, ZoomOutNavigator, or ZoomRectangleNavigator control at the web form, and put its ID to the Navigator property. Also you can use a PanNavigator to navigate the image by dragging the mouse.