private void Scroller_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
        {
            ///所有内容垂直高度 - 当前滚动的高度
            var v1 = Scroller.ExtentHeight - Scroller.VerticalOffset;
            //可视区域的高度
            var v2 = Scroller.ViewportHeight;

            if (v1 <= v2)
            {
                if (RequestCommand != null && RequestCommand.CanExecute(null))
                {
                    RequestCommand.Execute(null);
                }
            }
        }
예제 #2
0
        private void VisualStateGroup_CurrentStateChanged(object sender, VisualStateChangedEventArgs e)
        {
            var visualState = e.NewState.Name;

            if (visualState == "NoIndicator")
            {
                ///所有内容垂直高度 - 当前滚动的高度
                var v1 = Scroller.ExtentHeight - Scroller.VerticalOffset;
                //可视区域的高度
                var v2 = Scroller.ViewportHeight;
                if (v1 <= v2 + 1)
                {
                    // TODO: 在此处加载新数据
                    if (RequestCommand != null && RequestCommand.CanExecute(null))
                    {
                        RequestCommand.Execute(null);
                    }
                }
            }
        }