Hello Everyone, I searched a lot about how to make List view with (Load More) Feature but i have problem with check list view hit bottom or the last item of listview because i want to show 10 items in listview and check if listview hit the last item and load another 10 items...
so this my xaml.cs file:
ObservableCollection<WorldData> ADITM = new ObservableCollection<WorldData>();
public ObservableCollection<WorldData> ls1 { get { return ADITM; } }
public class WorldData
{
public string Name { set; get; }
public string Image { set; get; }
}
and i have problem in Listview ItemAppearing event:
private void MyListview_ItemAppearing(object sender, ItemVisibilityEventArgs e)
{
if (isLoading || ADITM.Count == 0)
return;
//when Listview hit bottom
if (e.Item.ToString() == ADITM[ADITM.Count - 1])
{
LoadMore();
}
}
output Error is:
Operator '==' cannot be applied to operands of type 'string' and 'MainWorlds.WorldData'
how to fix this Error and thanks :) and what the best way to show large data in listview ? is load all json data and show 10 items and when hit bottom show another 10 ? or limit json to get 10 items and request another 10 items and show it