VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging.UI.VisualTools Namespace / CompositeVisualTool Class
Members Example



In This Topic
    CompositeVisualTool Class
    In This Topic
    Visual tool which combines behaviour of several visual tools.
    Object Model
    CompositeVisualTool Class
    Syntax
    'Declaration
     
    Public Class CompositeVisualTool 
       Inherits VisualTool
       Implements Vintasoft.Imaging.UIActions.ISupportUIActions 
    public class CompositeVisualTool : VisualTool, Vintasoft.Imaging.UIActions.ISupportUIActions  
    public __gc class CompositeVisualTool : public VisualTool, Vintasoft.Imaging.UIActions.ISupportUIActions  
    public ref class CompositeVisualTool : public VisualTool, Vintasoft.Imaging.UIActions.ISupportUIActions  
    Example
    This example 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: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also