Bug 58028 - ListView cell replacement when unfocused results in a blank space
Summary: ListView cell replacement when unfocused results in a blank space
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-07-08 14:15 UTC by Daniel
Modified: 2017-07-12 22:50 UTC (History)
2 users (show)

Tags: ac uwp listview itemsource navigation
Is this bug a regression?: ---
Last known good build:

Sample that reproduces the bug (74.63 KB, application/x-7z-compressed)
2017-07-08 14:15 UTC, Daniel

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 for Bug 58028 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Daniel 2017-07-08 14:15:20 UTC
Created attachment 23421 [details]
Sample that reproduces the bug

The first replaced entry is turned into a blank space, this only seems to happen when the page that includes the ListView is inside a NavigationPage and the replacement occurs while the root page is not the current one.
The attached sample should reproduce the bug.
Comment 1 Jimmy [MSFT] 2017-07-10 15:08:06 UTC
I can reproduce this issue with the attached project. As mentioned, this is happening when the list item is replaced while on another page and only on first time. Subsequently replacing the other list items will work without issue.

This might be threading issue because using Device.BeginInvokeOnMainThread() appears to resolve the issue. So a possible workaround in the meantime is to do

> Device.BeginInvokeOnMainThread(() => _viewModel.DataSource[index] = "REPLACED");

### Steps to Reproduce
1. Run UWP project
2. Right click a list item
3. Select "Replace"

### Expected Results
The list item will change to show "REPLACED". Repeat steps 2 and 3 above again on another item to see this result.

#### Actual Results
The item becomes blank.

### Version Tests   BAD
2.3.5-pre6  BAD   BAD