maui icon indicating copy to clipboard operation
maui copied to clipboard

CarouselView Renders Duplicate Data Templates Multiple Times

Open JoeMayo opened this issue 2 years ago • 5 comments
trafficstars

Description

When running the Maui Samples, the CarouselView renders Monkey instances multiple times. In MonkeysViewModel.CreateMoneyCollection the code is loading 17 Monkey objects into Monkeys, an ObservableCollection of Monkey. However, the CarouselView is showing many more items than 17, duplicating the original 17 multiple times. Here's the URL to the solution in the maui-samples repository:

https://github.com/dotnet/maui-samples/tree/main/6.0/UserInterface/Views/CarouselViewDemos

I ran into this problem with my code and verified that it reproduces with the maui-samples solution too.

Steps to Reproduce

  1. Clone maui-samples
  2. Run the carousel demo at https://github.com/dotnet/maui-samples/tree/main/6.0/UserInterface/Views/CarouselViewDemos
  3. Select Horizontal Data Template
  4. Observe the duplicated templates.

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/tree/main/6.0/UserInterface/Views/CarouselViewDemos

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

10.0.17763.0

Did you find any workaround?

No response

Relevant log output

No response

JoeMayo avatar Nov 23 '22 04:11 JoeMayo

I have the same problem.

bcaceiro avatar Nov 23 '22 12:11 bcaceiro

Hi @JoeMayo - Can you try setting Loop="False" and letting us know if that resolves your issue? (Loop="True" by default)

rachelkang avatar Nov 23 '22 19:11 rachelkang

Hi @JoeMayo. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Nov 23 '22 19:11 ghost

@rachelkang Sorry, I added the Loop="False" attribute to the CarouselView, but no change for me.

JoeMayo avatar Nov 23 '22 20:11 JoeMayo

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost avatar Nov 24 '22 19:11 ghost

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0. Can repro on Windows and android platform with sample project. CarouselViewDemos

jinxinjuan avatar Jun 28 '23 07:06 jinxinjuan

Still facing this issue in MAUI .NET 8 RC1.

sps014 avatar Sep 29 '23 09:09 sps014

Still facing this issue

jerry2007 avatar Apr 23 '24 08:04 jerry2007

It's not just windows platform.... 👎

jerry2007 avatar Apr 24 '24 06:04 jerry2007