Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ItemsRepeater with NonVirtualizingLayout doesn't react to Replace action on ItemsSource #6614

Closed
1 of 2 tasks
acouvert-msft opened this issue Jan 17, 2022 · 3 comments
Closed
1 of 2 tasks
Labels
area-ItemsRepeater help wanted Issue ideal for external contributors no-issue-activity team-Controls Issue for the Controls team

Comments

@acouvert-msft
Copy link

Describe the bug

When replacing an entry in an ObservableCollection, used as ItemsSource of an ItemsRepeater configured with an NonVirtualizingLayout layout, the control receives a collection changed event about the Replace action but the NonVirtualizingLayoutContext provided to the MeasureOverride and ArrangeOverride will still have old Children representing old value.

Steps to reproduce the bug

  1. Create an ItemsRepeater with an ObservableCollection as ItemsSource and a NonVirtualizingLayout as Layout
  2. Update the ObservableCollection by replacing one entry with a new value
  3. Observe that the UI is not updated and still displays the old value of the entry which has been replaced.

Expected behavior

The UI should refresh and displays the new value instead of the old one.

Screenshots

No response

NuGet package version

No response

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

Insider Build (xxxxx)

Additional context

Note that ItemsRepeater::OnItemsSourceViewChanged is well received as expected when the replace action occurs.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Jan 17, 2022
@StephenLPeters
Copy link
Contributor

@ranjeshj FYI

@StephenLPeters StephenLPeters added help wanted Issue ideal for external contributors and removed needs-triage Issue needs to be triaged by the area owners labels Mar 2, 2022
@danmartinez
Copy link

danmartinez commented Apr 4, 2022

I encounter this issue with all Layout types, and during insertion and removal as well (not just when replacing an entry). However, I only experience this issue when the DataTemplate is a custom type. Defining the Xaml inline rather than in a separate UserControl works as intended.

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ItemsRepeater help wanted Issue ideal for external contributors no-issue-activity team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

3 participants