Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
785
Detecting Far-Right Scroll
posted

Hello All,

I have a XamDataGrid with horizontal orientation to which I am adding one record per second. I keep the newest records in view with this statement (placed immediately after the record add):
m_myDataGrid.ScrollInfo.ScrollOwner.ScrollToRightEnd();

However, I would like to *not* do this if the user has scrolled back from the right end. How may I check whether or not the control is scrolled all the way to the right?

Thanks,
Dave

 

Parents
  • 69686
    Suggested Answer
    posted

    Hello Dave,

    You can check the HorizontalOffset/VerticalOffset properties which will give you the current offset of the scrollbar. You can also check the ExtentWidth and ExtentHeight properties which will give you the size of the extent.

Reply Children