Category / Section
How to scroll to a particular vertical offset in the PDF viewer UWP programmatically?
1 min read
How to scroll to a particular vertical offset in the PDF viewer UWP programmatically?
We can navigate to the specified vertical offset value in PDF Viewer UWP by using ScrollToVerticalOffset(offset) method available in PdfViewerControl class. We can also retrieve the current vertical offset position by using VerticalOffset property available in PdfViewerControl class. Refer the following code snippet to navigate to the specified vertical offset and to retrieve current vertical offset value of the PDF Viewer control,
C#
// Scrolls the content to the specified vertical offset position in the PDF viewer control pdfViewer.ScrollToVerticalOffset(offset); // Retrieves the current vertical offset of the PDF viewer control. float verticalOffset = pdfViewer.VerticalOffset;
Sample link:
http://www.syncfusion.com/downloads/support/directtrac/126349/ze/PdfViewer_UWP552940835