GdPicture.NET.14
GdPicture14.WPF Namespace / GdViewer Class / DeleteAnnotation Method
The 0-based index of the required annotation within the current page of the displayed document. It must be a value from 0 to GetAnnotationCount-1.
Example





DeleteAnnotation Method (GdViewer)
Removes a required GdPicture/XMP annotation object specified by its index related to the current page of the document displayed in the GdViewer control.

Be aware that this method only handles GdPicture/XMP annotations.

Syntax
'Declaration
 
Public Sub DeleteAnnotation( _
   ByVal AnnotationIdx As Integer _
) 
 

Parameters

AnnotationIdx
The 0-based index of the required annotation within the current page of the displayed document. It must be a value from 0 to GetAnnotationCount-1.
Remarks
It is recommend to use the GetStat method to identify the specific reason for the method's failure, if any.

Be aware that annotations are always treated relative to the currently displayed page.

Example
How to delete all GdPicture/XMP annotations contained on the current page.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Dim annotCount As Integer = GdViewer1.GetAnnotationCount()
For i As Integer = 1 To annotCount
    GdViewer1.DeleteAnnotation(0)
    If GdViewer1.GetStat() <> GdPictureStatus.OK Then Exit For
Next
MessageBox.Show("Done!  Status: " + GdViewer1.GetStat().ToString(), "GdViewer.DeleteAnnotation")
See Also