Code: Select all
annotationView = GetAnnotationMarkImage("C:\\cancel-icon.png");
annotationView.Size = new SizeF(32, 32);
if (annotationView != null && tabImages.SelectedTab.AttachedControl is AnnotationViewer)
{
((AnnotationViewer)tabImages.SelectedTab.AttachedControl).AddAndBuildAnnotation(annotationView);
}