Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 26200 [details]
Screenshots (before & after scrolling), XAML and code behind
When using a ListView with a DataTemplateSelector, cells scrolled into view appear either partially or fully blank. The bound collections are still there, since clicking the blank cells brings up the correct detail page, but it seems the cached views have been disposed.
Bypassing the DataTemplateSelector and setting the ItemTemplate to a single DataTemplate fixes the problem. Also, you won't see the issue as long as you're viewing cells that are all resolved to the same DataTemplate. It's only when you start switching between templates that the cell contents start disappearing when scrolled into view.
Note: This problem only occurs on iOS platform. Everything works as expected on Android.
- Screenshot of two types of objects (HouseholdViewModel & ChildViewModel) that resolve to different DataTemplates, before and after scrolling
- Sample ContentPage XAML and code behind of affected ListView
- Visual Studio 2017 v15.5.7
- Xamarin v4.8.118
- Xamarin.iOS SDK v126.96.36.199
- Xamarin Forms v188.8.131.520555
Bugzilla issues are no longer tracked. Please file new issues on GitHub.