Skip to content

[regression/8.0.0-preview.1.7762] [WinUI] CollectionView runtime binding errors when loading the ItemSource asynchronously #16787

@nicop85

Description

@nicop85

Description

I was testing the last updates available for the Net 8 preview 6 (using Visual Studio 17.7), to see if everything continues to works as expected.

What I have found is that if you have a CollectionView that uses data binding inside it's DataTemplate, WinUI will report some binding problems if you load the ItemSource asynchronously like when you go to some API to get the data and then fill the ItemSource list with that data.

If you load the ItemsSource without waiting for an asynchronous response, everything work as expected.

App after showing the list:
image

Binding errors:
image

Steps to Reproduce

  1. Download the project linked below
  2. Run it targeting Windows

Link to public reproduction project repository

https://github.com/nicop85/CollectionViewBindingProblems.git

Version with bug

8.0.0-preview.1.7762

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

7.0.92

Affected platforms

Windows

Affected platform versions

Windows 10.0.17763.0

Did you find any workaround?

No

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

area-controls-collectionviewCollectionView, CarouselView, IndicatorViewarea-toolingXAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debuggingarea-xamlXAML, CSS, Triggers, Behaviorsfixed-in-8.0.0-rc.2.9373Look for this fix in 8.0.0-rc.2.9373!i/regressionThis issue described a confirmed regression on a currently supported versionpartner/cat 😻this is an issue that impacts one of our partners or a customer our advisory team is engaged withplatform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions