Question

I have problem with detecting when user reached the bottom of a ScrollViewer.

My Code:

bool atBottom = scrollViewer.VerticalOffset >= scrollViewer.ScrollableHeight;

But sometimes when I reached the bottom of Scrollviewer, value of scrollViewer.VerticalOffset is lower than scrollViewer.ScrollableHeight. It depends on items in listbox, but I dont know how.

Do you know, where is the problem?

Was it helpful?

Solution

You shouldn't use this approach to detect reaching the bottom of the scrollviewer. Instead you should use the Scroll states to detect this.

See http://blogs.msdn.com/b/slmperf/archive/2011/06/30/windows-phone-mango-change-listbox-how-to-detect-compression-end-of-scroll-states.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top