Detecting a scroll event in GridView (Windows 8)

孤者浪人 提交于 2019-12-06 03:25:50

The best way to do this seems that you can read through the components of the control, and assign events to it. based on what's happening in this example

http://mikaelkoskinen.net/post/WinRT-XAML-Automatically-Scrolling-ListView-to-Bottom-and-Detecting-When-ListView-is-Scrolled.aspx

I grabbed access to the scrollbar, suing the VisualTreeExtensions and I could capture the event Scroll, just like in the example. I had to read the children when the Loaded event of the grid was fired.

There is a simpler way.

Edit a template of the GridView, and look inside the XAML to find a ScrollViewer which is a component of the GridView.

The ScrollViewer has a ViewChanged event that you can subscribe to. Now whenever the GridView is scrolled, this event will be fired.

Try ManipulationCompleted and PointerReleased events on GridView. This is just using keyboard mouse..

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