Windows icon indicating copy to clipboard operation
Windows copied to clipboard

Alternate Row: ListviewBase always returns null

Open TyJOrtiz opened this issue 1 year ago • 3 comments

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.

TyJOrtiz avatar Jan 26 '24 22:01 TyJOrtiz

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 🙌

ghost avatar Jan 26 '24 22:01 ghost

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

michael-hawker avatar Jan 29 '24 18:01 michael-hawker

I also have code to fix that as well

TyJOrtiz avatar Jan 30 '24 02:01 TyJOrtiz