[UWP/WinRT] ListView UI virtualization works without explicit height on Cell/Row #367

Merged
merged 4 commits into from Sep 27, 2016

Conversation

Projects
None yet
4 participants
@samhouts
Member

samhouts commented Sep 20, 2016

Description of Change

The CellControl's MeasureOverride method will now return a non-zero height on the first pass so the ListView can estimate properly for UI virtualization. This will allow users to create ListViews without explicit heights set on the Cells and without an explicit RowHeight and still take advantage of UI virtualization on Windows platforms.

There is also a sample reproduction for 41271 that demonstrates a workaround for the apparent memory leak that is caused by UWP's default behavior, which is to cache all pages loaded into a tabbed layout. This sample also serves as a manual test case for the UI virtualization, as each tab contains a ListView with 1000 items, yet a fraction of that are loaded into the visual tree.

Bugs Fixed

API Changes

List all API changes here (or just put None), example:

Added:

  • const int Cell.DefaultCellHeight = 40;

Behavioral Changes

None

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

samhouts added some commits Sep 17, 2016

@rmarinho rmarinho merged commit c83c830 into master Sep 27, 2016

4 of 5 checks passed

iOS10-UITests Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS10 : Tests failed: 187…
Details
Android-UITests Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 : Tests passed: 346, ig…
Details
OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: OSX Debug : Running
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: Windows Debug : Tests passed: 3437, ignored: 8
Details
iOS9-UITests Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS9 : Tests passed: 342,…
Details

@rmarinho rmarinho deleted the fix-bugzilla41271 branch Sep 27, 2016

@samhouts samhouts added this to the 2.3.4 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment