Enable/disable scrollview


I would like my scrollview to do nothing when it’s not scrollable and scroll, bounce, so on when the content makes it scrollable but i haven’t found any easy solution (if it exists).

       <.. Some content ../>
       <WhileScrollable ScrollDirections="Down">
            <Change TriangleDown.Visibility="Visible" Duration="0.2"/>
   <!-- Image showing there is more down so u can scroll -->
   <Image ux:Name="TriangleDown"/>

In that example I would like the ScrollView to

1.- behave like a Panel when the content is not long enough to make it scrollable so: no bouncing, not showing the triangle when the user “scrolls down” (even when setting the SnapMaxTransform to false)

2.- behave like an ScrollView when the content is too long: bounce, displaying the triangle when needed

maybe that is not possible and that should be a feature request :slight_smile: it would be nice to have something similar to:

   <ScollView WhenNotScrollable="Disable/>

You can use WhileScrollable for this with the Invert property, which makes it do the opposite.

For example, something like:

<ScrollView ux:Name="theScrollView">
<WhileScrollable Directions="All" Invert="true">
   <Change theScrollView.UserScroll="false"/>

This should disable the user’s ability to scroll while there is nothing to scroll.

That was exactly what i was looking for.