Skip to content

CurrentItem is updated incorrectly on Android when the CarouselView is bound to an ObservableCollection with Loop = false #35643

Closed

Description

@mypp74

Description

CurrentItem.zip

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        InitializeComponent();

        BindingContext = CreateViewModel();
    }

    private void Button_Clicked(object sender, EventArgs e)
    {
        ViewModel? model = BindingContext as ViewModel;

        if (model?.Items != null)
        {
            // we replace the value of item 2 with 2b
            // and we update CurrentItem

            // Behavior on Android (CarouselView.Loop = false) :

            // - If before the change, CurrentItem was equal to "0" or "1", then after the change,
            // CurrentItem is equal to "2b": everything is OK

            // - If before the change, CurrentItem was equal to "2", then after the change,
            // CurrentItem is equal to "0": this is not OK, we expect CurrentItem to be equal to "2b"

            model.Items[2] = "2b";
            model.CurrentItem = "2b";
        }
    }

    private static ViewModel CreateViewModel()
    {
        return new()
        {
            Items = [
                "0",
                "1",
                "2"
            ],

            CurrentItem = "2"
        };
    }
}

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

10.0.70

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

Use Loop = True

Relevant log output

Activity

  1. added
    t/bug
    on May 27, 2026
  2. added
    area-controls-collectionview
    on May 27, 2026
  3. HarishKumarSF4517 commented on May 29, 2026

    @HarishKumarSF4517
    Contributor

    This issue has been validated in Visual Studio Code 1.122.0 with .NET MAUI versions 9.0.51, 9.0.60 and 10.0.70. It was reproducible on Android platform from 9.0.60 version. I have attached the video for reference:

    9.0.51(Issue not reproduced) 9.0.60(Issue reproduced)
    Screen.Recording.2026-05-29.at.12.09.36.PM.mov
    Screen.Recording.2026-05-29.at.10.51.04.AM.mov
  4. added
    partner/syncfusion
    on May 29, 2026
  5. added
    s/verified
    s/triaged
    i/regression
    on May 29, 2026
  6. added this to the Backlog milestone on Jun 8, 2026
  7. 8 remaining items

  8. added a commit that references this issue on Aug 26, 2026
  9. locked and limited conversation to collaborators on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewi/regressionpartner/syncfusionplatform/androidregressed-in-9.0.60s/triageds/verifiedt/bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions