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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting Vertical Offset in the SfDiagram ScrollViewer

Thread ID:





143462 Mar 20,2019 10:52 PM UTC Mar 21,2019 05:54 AM UTC WPF 1
Tags: SfDiagram
Michael Dorsey
Asked On March 20, 2019 10:52 PM UTC

I am looking for a way to get the Vertical Offset from the SfDiagram ScrollViewer.  I have an application that as it runs, the nodes will be created in a vertical fashion and I want the diagram to scroll to that node as it gets created, but I am not finding any properties that contain where the current offset is stored.  Any help would be appreciated!

Ramya Thirugnanam [Syncfusion]
Replied On March 21, 2019 05:54 AM UTC

Hi Michael, 
Thanks for contacting Syncfusion support. 
We have analyzed your requirement and provided suggestions for it. 
Suggestion 1  - Verticaloffset through ScrollSetting Property : 
We can get the VerticalOffset value through the ScrollSettings property of the SfDiagram. We have provided code example for this. 
Code Example : 
            //Getting VerticalOffset through ScrollSettings Property of SfDiagram 
            var verticaloffset = Diagram.ScrollSettings.ScrollInfo.VerticalOffset; 
            //Where Diagram is the instance of SfDiagram 
Suggestion 2 – BringIntoCenter and BringIntoView method: 
We can bring the newly added node to the center of the view or within the view by using BringIntoCenter and BringIntoView method. We have provided kb document for this. Please refer to the kb from the following link. 
We have provided sample for your requirement. Please find the sample through the below link. 
Ramya T 


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon