Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting a ScrollViewers maximum scroll values?

I'm trying to get the maximum amount a scrollviewer can scroll in the vertical and horizontal direction but I need to be doing this in a layout updated callback. This is what I'm currently doing:

        viewer.ScrollToRight( );
        doublehmax = viewer.HorizontalOffset;

        viewer.ScrollToBottom( );
        double vmax = viewer.VerticalOffset;

But this casues an error: "Unhandled Error in Silverlight 2 Application Layout cycle detected. Layout could not complete."

Is there a way I can get the max horizontal and vertical offsets of the scroll view area reliably even after window resizes and the like?

like image 616
meds Avatar asked Jun 21 '11 01:06

meds


1 Answers

use ScrollableWidth and Scrollableheight

like image 119
Navid Rahmani Avatar answered Oct 19 '22 13:10

Navid Rahmani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!