Bug 39668 - Overriding ListView.CreateDefault Does Not Work on Windows
Summary: Overriding ListView.CreateDefault Does Not Work on Windows
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.1.0
Hardware: PC Mac OS
: Normal critical
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-03-15 20:47 UTC by Jimmy [MSFT]
Modified: 2016-05-16 20:04 UTC (History)
4 users (show)

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

repro solution (154.64 KB, application/zip)
2016-03-15 20:47 UTC, Jimmy [MSFT]

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:

Description Jimmy [MSFT] 2016-03-15 20:47:17 UTC
Created attachment 15420 [details]
repro solution

### Overview
On Windows, a custom ListView subclass does not call its override CreateDefault() method. This means you cannot customize the default cell since none of the code in the method is ran. This happens in WinRT and UWP projects.

### Steps to Reproduce
1. Run the attached WP or UWP project

### Expected Results
The ListView should display three items with green backgrounds. You can run the Android project to see the expected result.

### Actual Results
The ListView displays a basic TextCell which is the built-in default. 

### Regression Status
v2.0.0.6482 : Good
v2.0.1.6505 : Good
v2.1.0.6521 : Bad
v2.1.0.6529 : Bad
Comment 1 Jason Smith [MSFT] 2016-03-18 07:18:37 UTC
Should be fixed in 2.2.0-pre1
Comment 2 Rajneesh Kumar 2016-04-22 09:09:49 UTC
I have checked this issue with XF and observed that this issue has been fixed. Now ListView display three items with green backgrounds.

Screencast: http://www.screencast.com/t/spvtNGuBK

This issue has been fixed hence I am closing this issue.

Comment 3 Jon Goldberger [MSFT] 2016-05-03 19:14:58 UTC
Re-opening as it appears this fix did not make it into the current stable version.

A customer is reporting that this issue is still present in the current stable version of Forms,, even though fix was present in and, so perhaps somehow this fix got removed from the current stable?
Comment 4 Jon Goldberger [MSFT] 2016-05-16 19:45:05 UTC
OK, I confirmed that the attached test project does work with, so the customer noted in comment 3 above must be hitting something else. 

Marking again as RESOLVED FIXED
Comment 5 Jon Goldberger [MSFT] 2016-05-16 20:04:03 UTC
Note: I tested both the UWP and the Windows 8.1 projects, and both worked as expected.