maui
maui copied to clipboard
CarouselView Renders Duplicate Data Templates Multiple Times
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
- Clone
maui-samples - Run the carousel demo at https://github.com/dotnet/maui-samples/tree/main/6.0/UserInterface/Views/CarouselViewDemos
- Select Horizontal Data Template
- 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
I have the same problem.
Hi @JoeMayo - Can you try setting Loop="False" and letting us know if that resolves your issue? (Loop="True" by default)
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.
@rachelkang Sorry, I added the Loop="False" attribute to the CarouselView, but no change for me.
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.
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0. Can repro on Windows and android platform with sample project. CarouselViewDemos
Still facing this issue in MAUI .NET 8 RC1.
Still facing this issue
It's not just windows platform.... 👎