I am making a news feed application that periodically adds new content to the top of the list. When I check for new items, there may be dozens or just one. I would like the oldest of the new elements to look into the view so that they can continue to scroll through new stories.
Unfortunately, this does not come for free from the platform. However, itβs interesting that it appears at the bottom of the list for free. If you add items to the bottom of the list, they look right with nice animations. If you add items to the top of the list, they just start flashing.
Are workarounds available? I feel that this is more likely a platform error - I install KeepItemsInView, but if I am at the top of the list, it does not save the item that I am viewing.
Repro Video: http://1drv.ms/1PP8AZz
Full source: http://1drv.ms/1PP8FfT
<ListView Grid.Row="1" ItemsSource="{x:Bind Items}" Padding="0,100,0,100"> <ListView.ItemTemplate> <DataTemplate > <Grid Margin="10"> <Image Source="{Binding}"/> </Grid> </DataTemplate> </ListView.ItemTemplate> <ListView.ItemsPanel> <ItemsPanelTemplate> <ItemsStackPanel Orientation="Vertical" ItemsUpdatingScrollMode="KeepItemsInView" /> </ItemsPanelTemplate> </ListView.ItemsPanel> </ListView>
source share