-
Notifications
You must be signed in to change notification settings - Fork 123
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
WinAppSDK 1.6.240821007-preview2 crashes (Unexpected type for enumerator) when iterating over ListView.Items if the ListView.ItemsSource is set via CollectionViewSource.
To Reproduce
Sample to reproduce the crash:
var items = new List<string>
{
"Item 1",
"Item 2"
};
var source = new CollectionViewSource()
{
Source = items
};
TheList.ItemsSource = source.View;
...
// Invoked via a button or something
foreach (var item in TheList.Items)
{
// Crash
}TheList is a simple ListView control.
Expected behavior
It shouldn't crash/throw an exception
Version Info
- TargetFramework: net8.0-windows10.0.22621.0
- TargetPlatformMinVersion: 10.0.17763.0
- WindowsSdkPackageVersion: 10.0.22621.38
- Microsoft.WindowsAppSDK package version: 1.6.240821007-preview2
Additional context
This is blocking WinAppSDK 1.6 version bump for .NET MAUI.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working