Click or drag to resize

AnnotationControllerCreateAnnotation Method (AnnotationUI)

Call this method to prepare the AnnotationController for creating a new annotation with the mouse.

Namespace:  Atalasoft.Annotate.UI
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public void CreateAnnotation(
	AnnotationUI annotation
)

Parameters

annotation
Type: Atalasoft.Annotate.UIAnnotationUI
The annotation to create.
Remarks
Examples
The following example creates a new ReferencedImageAnnotation and prepares the AnnotationController to render the annotation when the user drags the mouse on the AnnotateViewer.
CreateAnnotation
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "Images|*.bmp;*.jpg;*.png;*.tif;*.gif";
if (dlg.ShowDialog(this) == DialogResult.OK)
{
    ReferencedImageAnnotation ann = new ReferencedImageAnnotation(dlg.FileName, true);
    this.annotateViewer1.Annotations.CreateAnnotation(ann);
}
dlg.Dispose();
CreateAnnotationVB
Dim dlg As OpenFileDialog =  New OpenFileDialog() 
dlg.Filter = "Images|*.bmp;*.jpg;*.png;*.tif;*.gif"
If dlg.ShowDialog(Me) = DialogResult.OK Then
    Dim ann As ReferencedImageAnnotation =  New ReferencedImageAnnotation(dlg.FileName,True) 
    Me.annotateViewer1.Annotations.CreateAnnotation(ann)
End If
dlg.Dispose()
See Also