WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

Carousel change of SelectedIndex impacts application performance

Open adamfierek opened this issue 11 months ago • 15 comments

Describe the bug

Hello,

When property binded to Carousel SelectedIndex is changing, whole application slows down.

Example: Carousel is set to display some messages one by one. SelectedIndex is changing once per 5 seconds. Each firing of timer Elapsed, whole application nangs or slows down.

When I remove Carousel from code, there is no problem, so it;s not caused by timer and dispatching property. When I replace Carousel with some other items control like ListBox or ListView, everything works good.

Regression

No response

Reproducible in sample app?

  • [ ] This bug can be reproduced in the sample app.

Steps to reproduce

1. Add Carousel to Page
2. Bind ItemsSource to Carousel
3. Bind SelectedIndex (OneWay) to Carousel
4. Change property binded to SelectedIndex from code (some button or timer)

Expected behavior

Application should not slow down when Carousel's SelectedIndex is changed in ViewModel

Screenshots

No response

Windows Build Number

  • [X] 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)
  • [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)
  • [ ] 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

No response

Device form factor

Desktop

Nuget packages

No response

Additional context

No response

Help us help you

No.

adamfierek avatar Jul 26 '23 08:07 adamfierek