Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reordering GridView items causes crashes with AOT compilation #1685

Closed
lhak opened this issue Jul 29, 2024 · 0 comments
Closed

Reordering GridView items causes crashes with AOT compilation #1685

lhak opened this issue Jul 29, 2024 · 0 comments
Labels
AOT bug Something isn't working
Milestone

Comments

@lhak
Copy link

lhak commented Jul 29, 2024

Describe the bug

Using a GridView with the ItemsSource set to a class derived from ObservableCollection<Item> causes a crash when items are reordered due to an InvalidCastException. A workaround it to add code according to the documentation (https://github.com/manodasanW/WinUI-Gallery/blob/16ed717700b929dcb6591d32a4f10cd8b102aa07/WinUIGallery/VtableInitialization.cs#L24-L53) with typeName set to System.Collections.Specialized.SingleItemReadOnlyList.

Expected behavior

Should work without additional code

Version Info

CsWinRT 2.1.0-prerelease.240722.1
WindowsSDK 10.0.22621.37-preview

Additional context

@lhak lhak added the bug Something isn't working label Jul 29, 2024
@manodasanW manodasanW added the AOT label Jul 30, 2024
@manodasanW manodasanW added this to the Release 2.1 milestone Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AOT bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants