Skip to main content

PdfViewer.SelectNextAnnotation() Method

Selects the next annotation in the current document.

Namespace: DevExpress.Maui.Pdf

Assembly: DevExpress.Maui.Pdf.dll

NuGet Package: DevExpress.Maui.Pdf

Declaration

public void SelectNextAnnotation()

Remarks

The PDF viewer stores all document annotations in the Annotations collection. Once you or a user adds a new annotation, the PDF Viewer control re-sorts the Annotations collection to insert this annotation according to its position in the document. SelectNextAnnotation changes the focus to the next annotation in the document and therefore in the Annotation collection. SelectNextAnnotation is disabled when you sequentially call SelectNextAnnotation to iterate through annotations and reach the last annotation in the document.

If no annotations are selected in the PDF viewer, the SelectNextAnnotation method selects the first annotation on the current page. The PdfViewer.CurrentPageNumber property returns the index of the current page.

Call the SelectPreviousAnnotation() method to select the previous annotation.

You can also use PdfViewerCommands.SelectPreviousAnnotation and PdfViewerCommands.SelectNextAnnotation commands to switch focus between annotations.

See Also