none
请问如何知道GridView已经滑动到了末尾 RRS feed

  • 问题

  • 大家好,

    我使用GridView来显示有限个图片(10个),我需要在用户滑动到最后一个图片时显示一个提示,所以问题是我如何能够知道滑动到了末尾? 有什么事件?或者有什么别的方法? 谢谢!

    2014年6月3日 6:32

答案

  • Hi wd0623,

    有办法可以实现,不知道你听说过VisualTreeHelper了没有,可以找到GridView里面的一个ScrollViewer控件,通过对ScrollViewer控件的ScrollBarOffset的监听就可以知道什么时候已经被拉到最后。

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2014年6月4日 5:49
    版主

全部回复

  • Hi wd0623,

    有办法可以实现,不知道你听说过VisualTreeHelper了没有,可以找到GridView里面的一个ScrollViewer控件,通过对ScrollViewer控件的ScrollBarOffset的监听就可以知道什么时候已经被拉到最后。

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2014年6月4日 5:49
    版主
  • Hi wd0623,

    有办法可以实现,不知道你听说过VisualTreeHelper了没有,可以找到GridView里面的一个ScrollViewer控件,通过对ScrollViewer控件的ScrollBarOffset的监听就可以知道什么时候已经被拉到最后。

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    非常感谢, James ! 我马上尝试下。
    2014年6月4日 5:54