We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfPdfViewer set vertical offset of the page

Thread ID:





126349 Oct 10,2016 01:20 PM UTC Oct 11,2016 01:24 PM UTC UWP 1
Tags: SfPdfViewer
Asked On October 10, 2016 01:20 PM UTC

Hi. What is the correct way to set a vertical offset of the page? For example, I get the current offset value like:

var verticalOffset = pdfViewer.VerticalOffset;

And than in few moments later I try to set it like:


But offset is always set to 0. 

Thanks in advance

Balasubramanian Sundararajan [Syncfusion]
Replied On October 11, 2016 01:24 PM UTC

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. 


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. 

Balasubramanian S 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon