Metro App How to disable Gridview scrolling

拈花ヽ惹草 提交于 2019-12-20 02:45:15

问题


Is it possible to disable scrolling in GridView ?


回答1:


Try this inside of the GridView

<GridView
    ScrollViewer.HorizontalScrollBarVisibility="Disabled">



回答2:


As an alternative you could use

<GridView ScrollViewer.HorizontalScrollMode="Disabled" />

If you're setting this property dynamically, the Scrolling will be disabled but the ScrollPosition stays (on *ScrollBarVisibilty=Disabled the ScrollPosition gets set to 0)

Dynamic Example:

ScrollViewer.SetHorizontalScrollMode(YourGridView, ScrollMode.Disabled);


来源:https://stackoverflow.com/questions/12054273/metro-app-how-to-disable-gridview-scrolling

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