VintaSoft Imaging .NET SDK 10.1
Vintasoft.Imaging.UI Namespace / ImageViewer Class
Members Example



In This Topic
    ImageViewer Class
    In This Topic
    Represents a viewer control for displaying an image collection.
    Object Model
    ImageViewer ClassIObjectClipboard InterfaceThumbnailAppearance ClassVintasoftImage ClassThumbnailAppearance ClassDecodingSettings ClassRenderingSettings ClassImageCollection ClassVintasoftImage ClassImageViewerBase ClassPaddingF StructureImageRenderingRequirements ClassImageViewerState ClassVisualTool Class
    Syntax
    'Declaration
     
    <DockingAttribute(DockingBehavior.Ask)>
    <DesignerAttribute("System.Windows.Forms.Design.ScrollableControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
    <DefaultPropertyAttribute("Text")>
    <DefaultEventAttribute("Click")>
    <DesignerSerializerAttribute("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
    <ToolboxItemFilterAttribute("System.Windows.Forms")>
    <DesignerCategoryAttribute("Component")>
    Public Class ImageViewer 
       Inherits ImageViewerBase
    [Docking(DockingBehavior.Ask)]
    [Designer("System.Windows.Forms.Design.ScrollableControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [DefaultProperty("Text")]
    [DefaultEvent("Click")]
    [DesignerSerializer("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [ToolboxItemFilter("System.Windows.Forms")]
    [DesignerCategory("Component")]
    public class ImageViewer : ImageViewerBase 
    [Docking(DockingBehavior.Ask)]
    [Designer("System.Windows.Forms.Design.ScrollableControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [DefaultProperty("Text")]
    [DefaultEvent("Click")]
    [DesignerSerializer("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [ToolboxItemFilter("System.Windows.Forms")]
    [DesignerCategory("Component")]
    public __gc class ImageViewer : public ImageViewerBase 
    [Docking(DockingBehavior.Ask)]
    [Designer("System.Windows.Forms.Design.ScrollableControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [DefaultProperty("Text")]
    [DefaultEvent("Click")]
    [DesignerSerializer("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
    [ToolboxItemFilter("System.Windows.Forms")]
    [DesignerCategory("Component")]
    public ref class ImageViewer : public ImageViewerBase 
    Remarks
    ImageViewer allows to:
    • Preview image using different size modes
    • Scroll and zoom image
    • Magnify image
    • Select rectangular or custom image region
    • Copy/cut/paste image
    • Scale to gray (antialiasing) option for black-white images
    • Enable/disable buffering

    Supported size modes:

    ImageViewer has the image collection (the ImageViewerBase.Images property) which stores images associated with this viewer.

    ImageViewer can work separately (viewer will have own image collection) or as a slave viewer of another viewer (viewer will use the image collection of master viewer).
    Example
    Class ImageViewerExample
        Private _thumbnailViewer1 As Vintasoft.Imaging.UI.ThumbnailViewer = Nothing
        Private _imageViewer1 As Vintasoft.Imaging.UI.ImageViewer = Nothing
                
        Public Sub RunExample()
            _thumbnailViewer1.MasterViewer = _imageViewer1
            _imageViewer1.Images.Add("c:\multipage.tiff")
        End Sub
    End Class
    class ImageViewerExample
    {
        Vintasoft.Imaging.UI.ThumbnailViewer _thumbnailViewer1 = null;
        Vintasoft.Imaging.UI.ImageViewer _imageViewer1 = null;
                
        public void RunExample()
        {
            _thumbnailViewer1.MasterViewer = _imageViewer1;
            _imageViewer1.Images.Add(@"c:\multipage.tiff");
        }
    }
    Inheritance Hierarchy

    System.Object
       System.MarshalByRefObject
          System.ComponentModel.Component
             System.Windows.Forms.Control
                System.Windows.Forms.ScrollableControl
                   Vintasoft.Imaging.UI.ImageViewerBase
                      Vintasoft.Imaging.UI.ImageViewer
                         Vintasoft.Imaging.Annotation.UI.AnnotationViewer
                         Vintasoft.Imaging.UI.AnimatedImageViewer

    Requirements

    Target Platforms: .NET 5; .NET Core 3.1; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also