ScrollViewer CanContentScroll Property not Found (Windows 8.1 Universal App)

拜拜、爱过 提交于 2019-12-11 12:28:55

问题


I'm trying to get a ScrollView to logical scroll instead of physically. After reading up online on how to do this, most sources say to set the CanContentScroll property to False. However, when attempting to do this, it seems that ScrollViewer doesn't have this property.

Here is my XAML code:

<ScrollViewer x:Name="TestScroll" CanContentScroll="True"  HorizontalScrollBarVisibility="Disabled" HorizontalScrollMode="Disabled" Margin="66,215,1020,10" Grid.Row="1">
        <StackPanel x:Name="TestPanel" Orientation="Vertical">
        </StackPanel>
    </ScrollViewer>

And the error(s) thrown:

Error   1   The member "CanContentScroll" is not recognized or is not accessible.

Error 2 The property 'CanContentScroll' was not found in type 'ScrollViewer'

I am developing for Windows 8.1, creating a universal app. I feel like I'm missing something like a reference or something incredibly simple because everywhere else that I have looked, it just works.

Any help would be appreciated.


回答1:


Figured it out, using the VerticalSnapPointsType="Mandatory" property for ScrollViewer instead.



来源:https://stackoverflow.com/questions/30982576/scrollviewer-cancontentscroll-property-not-found-windows-8-1-universal-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!