Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfViewer.SelectPreviousAnnotation() Method

In This Article

Selects the previous annotation in the Annotations collection.

Namespace: DevExpress.Maui.Pdf

Assembly: DevExpress.Maui.Pdf.dll

NuGet Package: DevExpress.Maui.Pdf

#Declaration

C#
public void SelectPreviousAnnotation()

#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. SelectPreviousAnnotation changes the focus to the previous annotation in the document and therefore in the Annotation collection. SelectPreviousAnnotation is disabled when you sequentially call SelectPreviousAnnotation to iterate through annotations and reach the first annotation in the document.

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

Call the SelectNextAnnotation() method to select the next annotation.

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

See Also