VintaSoft Imaging .NET SDK 15.1: Документация для .NET разработчика
Vintasoft.Imaging.Annotation.UI Namespace / AnnotationViewer Class / VisualTool Property
Синтаксис Ремарки Example Требования Смотрите также
В этом разделе
VisualTool Свойство (AnnotationViewer)
В этом разделе
Возвращает или задает текущий VisualTool этого AnnotationViewer.
Синтаксис
Ремарки

Используйте экземпляр AnnotationVisualTool, возвращаемый этим свойством (не создавайте новый экземпляр класса AnnotationVisualTool), если просмотрщик должно использовать CompositeVisualTool в качестве активного визуального инструмента, а CompositeVisualTool должен содержать AnnotationVisualTool.

Пример

Вот пример, показывающий, как создать составной визуальный инструмент, который позволяет использовать визуальный инструмент аннотации и инструмент панорамирования вместе, а также установить инструмент в качестве активного инструмента в просмотрщике изображений с аннотациями.


''' <summary>
''' Creates the composite visual tool, which allows to use the annotation visual tool and
''' pan tool together, and sets the tool as active tool in annotation viewer.
''' </summary>
''' <param name="annotationViewer">The annotation viewer.</param>
Public Sub UseAnnotationVisualToolAndPanToolInAnnotationViewer(annotationViewer As Vintasoft.Imaging.Annotation.UI.AnnotationViewer)
    ' create the composite visual tool
    Dim tool As New Vintasoft.Imaging.UI.VisualTools.CompositeVisualTool(annotationViewer.AnnotationVisualTool, New Vintasoft.Imaging.UI.VisualTools.PanTool())

    ' set the composite visual tool as active tool in annotation viewer
    annotationViewer.VisualTool = tool
End Sub


/// <summary>
/// Creates the composite visual tool, which allows to use the annotation visual tool and
/// pan tool together, and sets the tool as active tool in annotation viewer.
/// </summary>
/// <param name="annotationViewer">The annotation viewer.</param>
public void UseAnnotationVisualToolAndPanToolInAnnotationViewer(
    Vintasoft.Imaging.Annotation.UI.AnnotationViewer annotationViewer)
{
    // create the composite visual tool
    Vintasoft.Imaging.UI.VisualTools.CompositeVisualTool tool = 
        new Vintasoft.Imaging.UI.VisualTools.CompositeVisualTool(
            annotationViewer.AnnotationVisualTool,
            new Vintasoft.Imaging.UI.VisualTools.PanTool());

    // set the composite visual tool as active tool in annotation viewer
    annotationViewer.VisualTool = tool; 
}

Требования

Целевые платформы: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

Смотрите также