dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.94k stars 1.7k forks source link

CarouselView behaves strangely when manipulating position in ViewModel #22468

Open Campfire9263 opened 3 months ago

Campfire9263 commented 3 months ago

Description

As expected, one can manipulate the position of the CarouselView to increase, but decreasing seems to misbehave. Here a clip to illustrate:

https://github.com/dotnet/maui/assets/121258054/ce431a06-e02a-433d-b6d1-d7b4fead9bb5

Upon debugging to follow the stack of calls, it seems the generated code to set the property bound to the CarouselViewPosition (set_CarouselViewPosition) is called three times in total when increasing, but only two times when decreasing.

Steps to Reproduce

  1. Build the repository CarouselViewSample
  2. Increase the position at least once
  3. Observe the strange behaviour when trying to go down.

Link to public reproduction project repository

https://github.com/Campfire9263/CarouselViewSample

Version with bug

8.0.7 SR2

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 11 and Windows 10

Did you find any workaround?

Except for giving up on CarouselView altogether, no.

Relevant log output

No response

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

kevinxufei commented 3 months ago

Can repro this issue at Windows platform on the latest 17.10 Preview 7(8.0.40).

bronteq commented 3 months ago

I also had this issue. I gave up on CarouselView, on Windows platform it is unusable, also for other important open issues: https://github.com/dotnet/maui/issues/18014