Xamarin.forms: [Bug] CarouselView, widthrequest and heightrequest issue

Created on 24 May 2019  路  2Comments  路  Source: xamarin/Xamarin.Forms

Description

Having a CarouselView control with a data template containing a grid does not inherit Width and Height values.

Steps to Reproduce

  1. Clone or download the sample I created on https://github.com/juanlao/xamarincarouselview
  2. Run the sample

Expected Behavior

Two carrouselView must be shown with the same images to do a carrouselView.

Actual Behavior

Only the first carrousel view shows the images. That carrousel has a stackpanel on the datatemplate but because the WidthRequest and HeightRequest properties are binded to the carrouselView.
The problem is that I can not define a datatemplate on other xaml to do the binding.

Basic Information

  • Version with issue: 4.0.0.425677

  • IDE: Visual Studio 2019

  • Platform Target Frameworks:

    • Android: 9.0

Reproduction Link

https://github.com/juanlao/xamarincarouselview

carouselview layout 6 partner bug

Most helpful comment

@juanlao CarouselView is still in very early stages. Thanks for the report! We'll be sure to address it as we continue work.

All 2 comments

@juanlao CarouselView is still in very early stages. Thanks for the report! We'll be sure to address it as we continue work.

Hi Juanma. Thanks for the repro sample!. I've been doing some tests.
Updating the sample to Xamarin.Forms 4.3 you will see the following result:
issue6301
The issue is fixed. Keep in mind that if you upgrade to the latest available version, 4.3.0.819712-pre2, you will have to change the Carousel Layout. The Layout supported is LinearItemsLayout.

Was this page helpful?
0 / 5 - 0 ratings