CommunityToolkit / Windows

Collection of controls for WinUI 2, WinUI 3, and Uno Platform developers. Simplifies and demonstrates common developer tasks building experiences for Windows with .NET.
https://aka.ms/windowstoolkitdocs
Other
550 stars 71 forks source link

AdvancedCollectionView items are empty in gallery sample under Windows App SDK #513

Open Arlodotexe opened 1 month ago

Arlodotexe commented 1 month ago

Describe the bug

When running the gallery with the Wasdk head on the latest main commit, the 'AdvancedCollectionView' sample does not display items properly. The items are in the list, but the contents are empty.

Wasdk: image

UWP: image

Steps to reproduce

1. Clone the repo
2. Generate the gallery solution, include the Collections component and the wasdk multitarget/head.
3. Build and deploy the wasdk gallery 
4. Navigate to the 'AdvancedCollectionView' sample page and observe empty list items.

Expected behavior

Contents should render the same as they did before Wasdk 1.6 and the same as on UWP.

Screenshots

No response

Code Platform

Windows Build Number

Other Windows Build number

No response

App minimum and target SDK version

Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

michael-hawker commented 4 weeks ago

Ah, I was just about to try doing some testing/work on the sample here. @Arlodotexe what's the easiest way to turn off the AOT stuff, but still test the expected result on WASDK? I imagine just a prop somewhere?

Is it just turn <PublishAot>true</PublishAot> to false?

michael-hawker commented 4 weeks ago

Oh, I just noticed seeing Exception thrown: 'System.NotSupportedException' in WinRT.Runtime.dll in my output... then I ran again... and came back later and it seemed to be working?

image

Maybe it's a UI refresh/binding/notification issue in this scenario or something? Will have to see if I notice it again or not.

michael-hawker commented 4 weeks ago

Ah, just noticed the PersonDataTemplate is using regular Binding instead of x:Bind, that may be related, maybe?

michael-hawker commented 3 days ago

This looks like the same issue from #514 with issues in the sample around not using x:Bind in the data templates.

Have some fixes incoming which will resolve this, tested with Debug and Release.