Unplanned
Last Updated: 30 May 2023 10:39 by JP
JP
Created on: 30 May 2023 10:39
Category: ListView
Type: Bug Report
1
ListView: [iOS] An exception occurs when LoadOnDemandMode is set to Automatic and there are no items initially in the collection

The bug can be reproduced quite easily with the SDK examples. Choose any ListView example from the LoadOnDemand category that uses LoadOnDemandMode set to Automatic, e.g. ListView/LoadOnDemand/LoadOnDemandEvent. Remove the initial items from the ItemsSource:

public ViewModel()
{
    this.Source = new ObservableCollection<string>();
    //for (int i = 0; i < 14; i++)
    //{
    //    this.Source.Add(string.Format("Item {0}", i));
    //}
    this.LoadItemsCommand = new Command(this.LoadItemsCommandExecute);
}

Run the example to observe the exception almost immediately.

0 comments