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





In This Topic
GdPicture14 Namespace / GdViewer Class / DeleteAnnotation Method

DeleteAnnotation Method (GdViewer)

In This Topic
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 _

) 
public void DeleteAnnotation( 

   int AnnotationIdx

)
public procedure DeleteAnnotation( 

    AnnotationIdx: Integer

); 
public function DeleteAnnotation( 

   AnnotationIdx : int

);
public: void DeleteAnnotation( 

   int AnnotationIdx

) 
public:

void DeleteAnnotation( 

   int AnnotationIdx

) 

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.

The method only handles GdPicture/XMP annotations as well.

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")
//We assume that the GdViewer1 control has been properly integrated

//and your document has been properly displayed as well.

int annotCount = GdViewer1.GetAnnotationCount();

for (int i = 1; i <= annotCount; i++)

{

    GdViewer1.DeleteAnnotation(0);

    if (GdViewer1.GetStat() != GdPictureStatus.OK)

        break;

}

MessageBox.Show("Done!  Status: " + GdViewer1.GetStat().ToString(), "GdViewer.DeleteAnnotation");
See Also