Windows
Windows copied to clipboard
Alternate Row: ListviewBase always returns null
Describe the bug
the code in "AlternateRow.cs":
_itemsForList.TryGetValue(sender, out Windows.UI.Xaml.Controls.ListViewBase listViewBase);
if (listViewBase == null) { return; }
always returns null. this is why when adding items to an existing list never changes the items following the new one.
Regression
No response
Reproducible in sample app?
- [X] This bug can be reproduced in the sample app.
Steps to reproduce
create a list and add an alternate row background property.
insert an item or remove an item
Expected behavior
when an item is added or removed from a list, all following items' background's should change. it does not
Screenshots
No response
Windows Build Number
- [X] Windows 10 1809 (Build 17763)
- [X] Windows 10 1903 (Build 18362)
- [X] Windows 10 1909 (Build 18363)
- [X] Windows 10 2004 (Build 19041)
- [X] Windows 10 20H2 (Build 19042)
- [X] Windows 10 21H1 (Build 19043)
- [X] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
- [X] Windows 10, version 1809 (Build 17763)
- [X] Windows 10, version 1903 (Build 18362)
- [X] Windows 10, version 1909 (Build 18363)
- [X] Windows 10, version 2004 (Build 19041)
- [ ] Other (specify)
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
Version 17.8.3
Device form factor
Desktop
Nuget packages
No response
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.
Hello TyJOrtiz, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
Related/Duplicate: https://github.com/CommunityToolkit/Windows/issues/327 ?
There was a platform issue related to ListViewItems, I think there was a different one related to this: https://github.com/microsoft/microsoft-ui-xaml/issues/6635
I also have code to fix that as well