Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

AdvancedCollectionView throws ArgumentOutOfRangeException when live shaping set to true. #4339

Open

Description

@w-ahmad

Describe the bug

AdvancedCollectionView throws ArgumentOutOfRangeException when live shaping set to true and try to change values of filter properties.

Steps to Reproduce

I've created a test app to reproduce this issue. The app contains two lists each of lists items source is bound to filtered advanced collection view source. To reproduce this issue drag & drop first item from list1 to list2 and then drag & drop fifth item from list 1 to list 2, you will notice the exception.

Test Project: https://github.com/w-libs/TestApp1

Expected behavior

Screenshots

image

Environment

NuGet Package(s):

Package Version(s):

Windows 10 Build Number:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • May 2020 Update (19041)
  • Insider Build ({build_number})

App min and target version:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • May 2020 Update (19041)
  • Insider Build ({build_number})

Device form factor:

  • Desktop
  • Xbox
  • Surface Hub
  • IoT

Visual Studio version:

  • 2017 (15.{minor_version})
  • 2019 (16.{minor_version})
  • 2022 (17.0) Preview 6

Activity

  1. added
    bug 🐛An unexpected issue that highlights incorrect behavior
    on Oct 22, 2021
  2. XAML-Knight commented on Oct 25, 2021

    @XAML-Knight
    Contributor

    The AdvancedCollectionView operates just fine, when I run a scenario test like this in our UnitTests.UWP project, with everything the same except for emulating drag and drop (i.e., to simulate drag & drop, I just simply removed a Model item from one AdvancedCollectionView and added it to another AdvancedCollectionView).

    For this particular issue, there may be more Drag & Drop settings that need to be explored.

  3. w-ahmad commented on Oct 26, 2021

    @w-ahmad
    Author

    This issue is actually not related to drag & drop. In test case I just used drag & drop to update a property of model.
    image

    and the property "Year" is responsible for the filter.
    image

    So the real problem in this case is with collection filtered items handling and it occurred in AddvancedCollectionView.cs at line 702 where it tries to compare items from source and view to get index for new item.

  4. michael-hawker commented on Oct 26, 2021

    @michael-hawker
    Member

    May be related to #4263 and #2913 as well?

  5. added this to the 7.2/8.0? milestone on Oct 26, 2021
  6. w-ahmad commented on Oct 26, 2021

    @w-ahmad
    Author

    May be related to #4263 and #2913 as well?

    I don't think so... cause these are related to handle removed item but here's the problem is in handle new items.

  7. XAML-Knight commented on Oct 26, 2021

    @XAML-Knight
    Contributor

    May be related to #4263 and #2913 as well?

    For those interested, I also implemented a unit test (in a similar manner) for removing the last item in an ACV, and the test ran fine

  8. michael-hawker commented on Oct 26, 2021

    @michael-hawker
    Member

    Thanks @XAML-Knight, did you want to open a PR so we can have that added to the existing test suite?

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

    In-PR 🚀bug 🐛An unexpected issue that highlights incorrect behavior

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions