DLToolkit.Forms.Controls
DLToolkit.Forms.Controls copied to clipboard
How to manage fast scrolling? It disappear cells in FlowListView.
Hi, I am new here. Please correct me if my language is bit childish.
I am using FlowListView to show FacebookAlbum Pictures. I use 4 column to display. So, 1 screen can have approx 32-36 pictures. I get all the pictures of the album from Facebook and assign source of pictures to FlowListView.
Now the problem is if user have 400 pictures, it will be 10-12 scroll. If user scroll slowly, it renders correctly. But if user scroll fast, it misses some cell and shows blank. Sometimes, 1-2 rows are blank. Note: If I scroll up/down, blank cell images renders correctly. Sometimes, other images disappears too.
View
<flv:FlowListView RowHeight="100" FlowColumnCount="4" SeparatorVisibility="None" HasUnevenRows="false"
FlowItemsSource="{Binding Photos}" IsVisible="{Binding IsLoading, Converter={StaticResource invertBooleanConverter}}">
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<Image Aspect="AspectFill" Source="{Binding Picture}"/>
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
</flv:FlowListView>
ViewModel
public ObservableCollection<FacebookPicture> Photos { get; set; }
private async Task SelectAlbumCommandExecute(string albumId)
{
try
{
IsLoading = true;
Photos = await getPhotos();
await System.Threading.Tasks.Task.Delay(1000);
IsLoading = false;
}
catch (Exception)
{
}
finally
{
IsLoading = false;
}
}
FacebookPicture Class
public class FacebookPicture
{
public string Picture { get; set; }
public string Source { get; set; }
public string id { get; set; }
}
Screen shot:
why Dont you Use LoadMore Command and InfiniteLoading Enabled in FlowListView ? This might help