Hello SimonGhost-8216,
Welcome to our Microsoft Q&A platform!
output Error is: Operator '==' cannot be applied to operands of type 'string' and 'MainWorlds.WorldData'
This is because e.Item.ToString()
returns a string value, but e.Item
is type of the 'WorldData' in your project. In the ItemAppearing event, e.Item
is the type of Model data. You could use it directly to detect it the bottom item is the last item. Or you can also use e.ItemIndex to check the index of the bottom item.
Here is the sample code, you could refer to it.
private void ListView_ItemAppearing(object sender, ItemVisibilityEventArgs e)
{
if (e.Item == ADITM[ADITM.Count - 1])
{
LoadMore();
}
//or use e.ItemIndex to detect if it's the last item
//if (e.itemindex == aditm.count - 1)
//{
// loadmore();
//}
}
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.