VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.UI.VisualTools Namespace / ZoomSelectionTool Class
Members Object Syntax Remarks Example Hierarchy Requirements SeeAlso
In This Topic
ZoomSelectionTool Class
In This Topic
Visual tool for zooming image region in image viewer.
Object Model
IInteractionController IInteractionController RectangularObjectTransformer IObjectClipboard ImageViewer ZoomSelectionTool
Syntax
'Declaration

Public Class ZoomSelectionTool
   Inherits RectangularSelectionTool

public class ZoomSelectionTool : RectangularSelectionTool

Remarks

Rectangular region of image in image viewer can be zoomed as follows:

  • place the mouse to the desired position
  • press the action button (ActionButton) and select the "zoom" region by holding the action button
  • release the action button
  • press the action button (ActionButton) inside the "zoom" region for zooming of image; press any mouse button outside of the "zoom" region for canceling zooming of image

If ActionButton is set to right mouse button, context menu during action can be disabled with the DisableContextMenu property.

Example

This C#/VB.NET code shows how to programmatically zoom an image in image viewer.


Class ZoomSelectionToolExample
    ' Programmatically zoom an image in image viewer.
    Public Sub ProgrammaticallyZoomImageInViewer(viewer As Vintasoft.Imaging.UI.ImageViewer)
        ' create an instance of ZoomSelectionTool class
        Dim zoomSelectionTool As New Vintasoft.Imaging.UI.VisualTools.ZoomSelectionTool()
        ' set the tool as the current tool of the ImageViewer
        viewer.VisualTool = zoomSelectionTool
        ' set the region of interest on image
        zoomSelectionTool.Rectangle = New System.Drawing.Rectangle(50, 50, 250, 150)
        ' zoom the selected region of image
        zoomSelectionTool.Zoom()
    End Sub
End Class


class ZoomSelectionToolExample
{
    // Programmatically zoom an image in image viewer.
    public void ProgrammaticallyZoomImageInViewer(
        Vintasoft.Imaging.UI.ImageViewer viewer)
    {
        // create an instance of ZoomSelectionTool class
        Vintasoft.Imaging.UI.VisualTools.ZoomSelectionTool zoomSelectionTool = 
            new Vintasoft.Imaging.UI.VisualTools.ZoomSelectionTool();
        // set the tool as the current tool of the ImageViewer
        viewer.VisualTool = zoomSelectionTool;
        // set the region of interest on image
        zoomSelectionTool.Rectangle = new System.Drawing.Rectangle(50, 50, 250, 150);
        // zoom the selected region of image
        zoomSelectionTool.Zoom();
    }
}

Inheritance Hierarchy
Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also