Hi Bohdan,
Thank you for using Syncfusion product.
We can achieve the requirement of scrolling to the particular offset of the PDF viewer control by getting the current vertical scroll position of PDF viewer in button click event. Please find the code example from below,
Code Example:
Below code example which retrieves the current scroll offset position of the PDF viewer control UWP.
private void PdfViewer_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
// Retrieves the current vertical offset of the PDF viewer control.
textBox2.Text = (pdfViewer.VerticalOffset).ToString();
}
|
Below code example which allows us to navigate to the specified offset in the PDF viewer control UWP.
private void button_Click(object sender, RoutedEventArgs e)
{
float verticalOffset = float.Parse(textBox.Text);
//To navigate to the specified offset in the PDF viewer control.
pdfViewer.ScrollToVerticalOffset(verticalOffset);
}
|
We have also create a simple sample which illustrates in navigating to the particular offset in the PDF viewer control using the ScrollToVerticalOffset method and the sample can be downloaded from the following link,
If are still facing any problem in retrieving the current offset and scrolling to the specific offset of the PDF viewer control kindly get back to us with more details on your query.
Thanks,
Balasubramanian S