Skip to content

Alternate Row: ListviewBase always returns null #323

Open

Description

@TyJOrtiz

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?

  • 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

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • 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.

Activity

  1. michael-hawker commented on Jan 29, 2024

    @michael-hawker
    Member

    Related/Duplicate: #327 ?

    There was a platform issue related to ListViewItems, I think there was a different one related to this: microsoft/microsoft-ui-xaml#6635

  2. moved this to 📋 Backlog in Toolkit 8.xon Jan 29, 2024
  3. TyJOrtiz commented on Jan 30, 2024

    @TyJOrtiz
    Author

    I also have code to fix that as well

  4. added
    bug
    ux 🖌️
    components::extensions
    on Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcomponents::extensionsux 🖌️

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions