问题描述
我已经阅读了关于滚动到列表视图底部时如何进行增量加载的文章,但是当我们滚动到列表顶部时如何实现延迟加载.当用户到达顶部时,我想将更多项目添加到列表顶部.有什么办法可以做到这一点.
I have read the articles about how to do incremental loading when we scroll to bottom of the list view, but how to achieve lazy loading when we scroll to top of the list. I want to add more items to the top of the list when the user reaches the top. Is there any way we can achieve this.
推荐答案
为此找到了解决方案.旋转两个控件.
Found a solution for this. Rotate both controls.
例如->
<ListView.RenderTransform><RotateTransform Angle="180"></RotateTransform></ListView.RenderTransform><ListView.ItemContainerStyle><Style TargetType="ListViewItem"><Setter Property="HorizontalContentAlignment" Value="Stretch"/><Setter Property="VerticalContentAlignment" Value="Stretch"/></风格></ListView.ItemContainerStyle><ListView.Resources><DataTemplate x:Key="DataTemplateGridViewMain"><Grid HorizontalAlignment="Stretch" Background="#FF7C1A9B" RenderTransformOrigin="0.5,0.5"><Grid.RenderTransform><RotateTransform Angle="180"/></Grid.RenderTransform><TextBlock HorizontalAlignment="Left" Text="{Binding}" VerticalAlignment="Center" FontSize="20" FontFamily="Tempus Sans ITC"/></网格></数据模板></ListView.Resources><ListView.ItemTemplate><StaticResource ResourceKey="DataTemplateGridViewMain"/></ListView.ItemTemplate></ListView>
为我工作.
这篇关于ListView WP8 中的增量加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!