Bug 52902 - ListView GetEnumerator now called against IList ItemsSource upon Selection
Summary: ListView GetEnumerator now called against IList ItemsSource upon Selection
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-02-28 15:52 UTC by Gerard C
Modified: 2017-03-02 13:46 UTC (History)
3 users (show)

Tags: listview
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Gerard C 2017-02-28 15:52:13 UTC
In 2.3.3, a ListView with an IList as ItemsSource would have the index referenced upon item selection.  In 2.3.4-pre2, selecting a ListView item triggers a call to GetEnumerator() against my IList which virtualizes an infinite list.
Comment 1 Gerard C 2017-02-28 16:20:48 UTC
I implemented GetEnumerator() and found that the ListView executes MoveNext() once then goes back to using the IList so the impact is minimal.  I just had to implement GetEnumerator() where it was not implemented before.
Comment 2 Jimmy [MSFT] 2017-03-01 17:50:52 UTC
Thank you for filing this report!
Are you implementing your own IList to use as the ItemSource? Can you attach a sample project that reproduces this issue?
Comment 3 Gerard C 2017-03-02 13:46:46 UTC
Cannot reproduce in OOB project.  Will revisit if I can find the right mixture of components from my project to reproduce.  Thanks.