CommunityToolkit / CommunityToolkit/Windows
Alternate Row: ListviewBase always returns null
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 166
- PR merge metrics
- No merged PRs in 30d
Description
### 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
```text
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.
Contributor guide
Assessment
This issue has not been assessed yet.