Forum Xamarin Xamarin.Forms

How to create double CarouselView in XamarinForms

adrianuxxadrianuxx Member ✭✭

Hello guys. I need to create some sort of a double CarouselView in Xamarin. Imagine something like a list of countries. The fist Carrousel will have continents, will tick on it and will show a second CarouselView with the counties in this continent. I have the first CarouselView made and it's working, I don't know if will be possible to implement a second one that have dependencies on the first one. Something like the famous Disney App.


  • LandLuLandLu Member, Xamarin Team Xamurai

    We could register the CurrentItemChanged, PositionChanged or Scrolled events of CarouselView to detect the scrolling of the carousel view.
    And then change the second carousel view's items source depending on the former one's current item.
    But if you only want to create controls for the selection of countries and cities I will recommend you to use Picker. It has a simple appearance for this kind of requirement.

  • adrianuxxadrianuxx Member ✭✭

    I have tried using the Picker, and the binding to the carousel view is dynamic inside the C# code. The problem is that the Carrousel is not refreshing the values when I change a value into the Picker. Any solution?

  • LandLuLandLu Member, Xamarin Team Xamurai

    How did you refresh the values?
    Could you please share some code here?

  • adrianuxxadrianuxx Member ✭✭

    public ObservableCollection PLC { get; private set; }

    This is where the carousel should update its values

    void CreatePLCCollection()
    PLCEX = null;

            bool areEqualTempe = String.Equals(SelectedInstalacion, "Inditex Tempe",comparisonType: StringComparison.OrdinalIgnoreCase);
            if (areEqualTempe==true) 
                PLCEX = new ObservableCollection<PLC_Existing>(Data.TempeData.TempePLCs);
                PLCEX = new ObservableCollection<PLC_Existing>(Data.ZaraHomeData.ZaraHomePLC);
Sign In or Register to comment.