ScrollViewer.ChangeView ScrollableHeight RRS feed

  • Question

  • To change the the scroll position of a windows.ui.xaml.listiview in windows 8.1 we should be using the ScrollViewer.ChangeView method.


    The units of this method, for the height, are from 0 - ScrollViewer.ScrollableHeight.

    The help file, and intellisense for ScrollViewer.ScrollableHeight says this:


    Gets a value that represents the vertical size of the area that can be scrolled; the difference between the width of the extent and the width of the viewport.


    1) it is a height not a width

    2) if the extent height is 100 and the viewport height is 5, according to this definition the ScrollableHeight is 100-5=95. I don't understand how that information is in any way useful to me to use the ScrollViewer.ChangeView method

    3) Is 0 from the extents or the viewport?

    Thursday, March 6, 2014 5:47 AM


  • 0 is the top of the ScrollViewer. This will be 0 for both the viewport and the content. The offset is relative to content.

    ScrollableHeight (extent - viewport) is how far down you can scroll. If you scroll to ScrollableHeight then the bottom of the content should be at the bottom of the viewport. The viewport size is subtracted since we scroll to the top of the viewport.


    Thursday, March 6, 2014 7:11 AM