0
我已經實現了增量加載,捕獲GridView中的scrollviewer,然後綁定它的ViewChanged事件,如下面的代碼所寫。我應該實現什麼邏輯,當滾動到達頁面結束時,只有它應該調用web服務?目前,我做了以下的方法:在Grid View中實現公司加載?
private ScrollViewer _scroll;
this._scroll = GetVisualChild<ScrollViewer>(grdVw1);
if (_scroll != null)
_scroll.ViewChanged += scroll_ViewChanged;
async void scrollSnap_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
{
// Call the web service
if (_scrollSnap.ScrollableWidth - _scrollSnap.HorizontalOffset < 10)
{
// Webservice call
}
}