VintaSoft Imaging .NET SDK 14.0: Documentation for .NET developer
Vintasoft.Imaging.UI.VisualTools Namespace / CompositeVisualTool Class
Members Object Syntax Example Hierarchy Requirements SeeAlso
In This Topic
    CompositeVisualTool Class
    In This Topic
    Represents a visual tool which combines behaviour of several visual tools.
    Object Model
    VisualTool VisualTool ImageViewer CompositeVisualTool
    Syntax
    'Declaration
    
    Public Class CompositeVisualTool
       Inherits VisualTool
       Implements ISupportUIActions
    
    
    public class CompositeVisualTool : VisualTool, ISupportUIActions
    
    
    public __gc class CompositeVisualTool : public VisualTool*, ISupportUIActions
    
    
    public ref class CompositeVisualTool : public VisualTool^, ISupportUIActions
    
    
    Example

    This C#/VB.NET code shows how to set the CompositeVisualTool as active visual in annotation viewer.

    
    ''' <summary>
    ''' Adds the visual tool, which allows to change annotations and scroll images in viewer,
    ''' to the annotation viewer.
    ''' </summary>
    ''' <param name="annotationViewer">Annotation viewer.</param>
    Public Sub AddCompositeVisualToolToAnnotationViewer(annotationViewer As Vintasoft.Imaging.Annotation.UI.AnnotationViewer)
        ' create composite visual tool, which will combine the following visual tools:
        ' - annotation visual tool
        ' - annotation selection tool
        ' - scroll pages
        Dim compositeVisualTool As New Vintasoft.Imaging.UI.VisualTools.CompositeVisualTool(annotationViewer.AnnotationVisualTool, annotationViewer.AnnotationSelectionTool, New ScrollPages())
        ' set the tool as active tool in image viewer
        annotationViewer.VisualTool = compositeVisualTool
        ' specify that image viewer must not show context menu when the right mouse button is pressed
        annotationViewer.VisualTool.DisableContextMenu = False
    End Sub
    
    
    
    /// <summary>
    /// Adds the visual tool, which allows to change annotations and scroll images in viewer,
    /// to the annotation viewer.
    /// </summary>
    /// <param name="annotationViewer">Annotation viewer.</param>
    public void AddCompositeVisualToolToAnnotationViewer(
        Vintasoft.Imaging.Annotation.UI.AnnotationViewer annotationViewer)
    {
        // create composite visual tool, which will combine the following visual tools:
        // - annotation visual tool
        // - annotation selection tool
        // - scroll pages
        Vintasoft.Imaging.UI.VisualTools.CompositeVisualTool compositeVisualTool =
            new Vintasoft.Imaging.UI.VisualTools.CompositeVisualTool(
            annotationViewer.AnnotationVisualTool,
            annotationViewer.AnnotationSelectionTool,
            new ScrollPages());
        // set the tool as active tool in image viewer
        annotationViewer.VisualTool = compositeVisualTool;
        // specify that image viewer must not show context menu when the right mouse button is pressed
        annotationViewer.VisualTool.DisableContextMenu = false;
    }
    
    

    Inheritance Hierarchy
    Requirements

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

    See Also