Xamarin.forms: [Bug] [UWP] Dynamic Item Sizing doesn't work in CollectionView on UWP

Created on 31 Dec 2019  路  4Comments  路  Source: xamarin/Xamarin.Forms

Description

On UWP, the CollectionView's items do not resize to content changing size. Items remain a fixed height whereas on Android items will shrink and expand to fit the content. https://gist.github.com/hartez/7d0edd4182dbc7de65cebc6c67f72e14

Steps to Reproduce

  1. Create a CollectionView, populate with multiple items, and have the data template have multiple rows of data
  2. Hide one row of data by default
  3. Dynamically toggle that row on and off using something like a button

Expected Behavior

The item will expand/contract to show/hide the row.

Actual Behavior

The row pushes/covers other content or doesn't show because the item remains a fixed height on UWP.

Basic Information

  • Version with issue: 4.4.0.991265
  • Last known good version: N/A
  • IDE: Visual Studio 2019 16.3.6
  • Platform Target Frameworks:

    • iOS: N/A

    • Android: N/A

    • UWP: 16299

  • Android Support Library Version: N/A
  • Nuget Packages: N/A
  • Affected Devices: N/A

Screenshots

Genre can be toggled to show on the Android version but not the UWP version.
uwp-not-resizing
android-resizing

Reproduction Link

DynamicItemSizingUWP.zip

collectionview 4 high impact UWP bug

Most helpful comment

Any news on that? A simple Label that changes text at runtime is not usable with CollectionView on UWP.

For the moment the workaround I found is to remove the item from the Collection and re-insert it to force redraw of element.

All 4 comments

Any news on that? A simple Label that changes text at runtime is not usable with CollectionView on UWP.

For the moment the workaround I found is to remove the item from the Collection and re-insert it to force redraw of element.

Same issue here...

I think this issue can be closed. I updated my reproduction project to 4.7.0.1260 and the issue is fixed,

image

I confirm in XF 4.8.0.1269, CollectionView item resize correctly on content visibility and size change 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hudhud picture Hudhud  路  3Comments

MartinWegner picture MartinWegner  路  3Comments

jgold6 picture jgold6  路  3Comments

simontocknell picture simontocknell  路  3Comments

joseluisct picture joseluisct  路  3Comments