Forum Xamarin.Forms

Coverflow/Carousel view for xamarin forum

arupdebroyarupdebroy USMember
edited March 2016 in Xamarin.Forms

Hi I am looking for coverflow/carousel view for xamarin form.I will try for renderer but In android I did not get any help(Carousel page is not helpful because its not showing the previous/post image/video in same frame). If some has any answer for this that will be help full. I am able find IOS component(https://components.xamarin.com/view/Alliance.Carousel) but in android I don't have any clue. I want the effect like below or you can check the screenshot for help. Thanks in advance

1>2>3

Answers

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
  • arupdebroyarupdebroy USMember
    edited March 2016

    @AlessandroCaliaro Hi i already go trough this link it does not satisfy my requirement. I need three image should show in same frame but middle one always highlighted and binding the image will be dynamic.ayways thanks a lot for answer

    1> 2 > 3

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    @arupdebroy - just thought I would mention Xamarin Forms now officially has a CarouselView as of 2.2.0.

    I did a quick blog on it here because there is no official documentation that I can find on it yet: http://www.xamarinhelp.com/carousel-view-xamarin-forms/

  • StephenPriceStephenPrice AUMember ✭✭

    Hoping this is a step in the right direction. www.xamarinhelp.com doesn't seem to be up right now.

  • RussellCollinghamRussellCollingham GBUniversity ✭✭

    @AdamP said:
    @arupdebroy - just thought I would mention Xamarin Forms now officially has a CarouselView as of 2.2.0.

    I did a quick blog on it here because there is no official documentation that I can find on it yet: http://www.xamarinhelp.com/carousel-view-xamarin-forms/

    Server not found error...

  • AdamPAdamP AUUniversity ✭✭✭✭✭
    edited April 2016

    @RussellCollingham - thanks, looks like an Azure DNS issue. DNS for all my sites has disappeared at the moment. Serves me right for using a preview service :)

    Update: just moved all DNS over to Route53. Just have to wait propagation or azure dns might come back up in the meantime. :(

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    @RussellCollingham - And Azure DNS is back up. :)

  • DH_HA1DH_HA1 USMember ✭✭✭

    @AdamP the iOS renderer is a UICollectionView

  • AdamPAdamP AUUniversity ✭✭✭✭✭

    Thanks for picking that up @DarrenHaligas.3887. I have made the correction.

  • PaulHoetsPaulHoets USMember ✭✭

    Hmm, I'm using the latest Xamarin carouselView, but I think I'm missing something, and it might be due to the fact I'm still learning how to bind, how to use datatemplates, and how to create a collection, then link them all together.

            public IntroScreen()
            {
    
                Person[] persons =
                {
                    new Person() { Name = "Corrado", TipIcon = "male.png", TipColor = Color.Red, Description = "Hello" },
                    new Person() { Name = "Giulia", TipIcon = "female.png", TipColor = Color.Blue, Description = "HelloHello" }
                };
    
                var carousel = new CarouselView {
    
                    ItemsSource = persons,
                    ItemTemplate = TipViewModel.DailyTipTemplate,
                    VerticalOptions = LayoutOptions.FillAndExpand,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    BackgroundColor = StylesPackNew.leafyGreen,
                    HeightRequest = 200,
                };
    
                var stack = new StackLayout
                {
                    BackgroundColor = StylesPackNew.leafyGreen,
    
                    Children =
                    {
                        carousel,
                    }
                };
    
                Content = stack;
            }
    

    And the dataTemplate...

                DailyTipTemplate = new DataTemplate(() => {
    
                    var stack = new StackLayout {
                        HorizontalOptions = LayoutOptions.FillAndExpand,
                        VerticalOptions = LayoutOptions.FillAndExpand,
    
                    };
    
                    var nameLabel = new Label { FontAttributes = FontAttributes.Bold };
                    var descriptionLabel = new Label();
                    var image = new Image { HorizontalOptions = LayoutOptions.FillAndExpand };
    
                    stack.SetBinding(StackLayout.BackgroundColorProperty, "TipColor");
                    nameLabel.SetBinding(Label.TextProperty, "Name");
                    descriptionLabel.SetBinding(Label.TextProperty, "Description");
                    image.SetBinding(Image.SourceProperty, "TipIcon");
    
                    stack.Children.Add(nameLabel);
                    stack.Children.Add(descriptionLabel);
                    stack.Children.Add(image);
    
                    return new ViewCell { View = stack };
                });
    

    It throws a "System.ArgumentNullException: Value cannot be null. Parameter name: key" error.

    Any ideas?

  • Ashish_sharmaAshish_sharma INMember ✭✭✭
    edited September 2019

    How to bind Video file into carouselView in Xamarin forms??

  • JohnHardmanJohnHardman GBUniversity admin

    @Ashish_sharma said:
    How to bind Video file into carouselView in Xamarin forms??

    As per the forum rules & guidelines, do not try to re-awaken old threads (anything over 6 months typically).

    Post your question as a new thread.

  • Have a look at full step by step tutorial to create cover flow in Xamarin form
    http://mobilecodes.tech/index.php/2020/11/27/xamarin-forms-how-to-create-cover-flow-animation-in-xamarin-forms/

Sign In or Register to comment.