We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SFCarousl Height

Hello,
I'm trying to implement SFCarousl in a simple xamarin forms page (xaml), in a very simple way.

I insert the following in xaml:

<syncfusion:SfCarousel x:Name="carousel" />

Then in the code behind, I populate the gallery from image repository (the source of every single image is ImageUri).

But the gallery's height is very small.

I try with: HeightRequest, ItemHeight and so on, but only internal images of the gallery change the height, not the container, that remains small.

Thanks for any help.
David

3 Replies

HM Hemalatha Marikumar Syncfusion Team July 31, 2017 04:15 PM UTC

Hi David,

Thanks for contacting Syncfusion Support.

We were unable to reproduce the reported issue "CarouselItem 's height remains same not increased while increasing ItemHeight and HeightRequest". We have created a simple sample for achieving your requirement by increasing not only ItemHeight but also ItemWidth. Please download the sample from the following link

Link: http://www.syncfusion.com/downloads/support/forum/131815/ze/GettingStarted121608671 

Please have a look at the sample and if the issue still persist, update us the modified sample or the replication procedure to analyze further and provide the solution.

Regards,
Hemalatha M. 



DD Davide D Angelo August 1, 2017 09:23 AM UTC

Hello Hemalatha,

thanks for the reply.

It seems that is impossible to set ItemHeight or ItemWidth from xaml. I use MVVM pattern for populate the datasource from a remote server.

I solved by setting the width and the heigth only after that the datasource of the carousel changed.

Regards,

Davide D.



HM Hemalatha Marikumar Syncfusion Team August 3, 2017 04:53 PM UTC

Hi David,

Thanks for your update.

Query: Impossible to set ItemHeight or ItemWidth from xaml.

In general, we can set ItemHeight or ItemWidth from xaml. In our previous sample we have changed the height of Carousel item dynamically through button click to represent that the height can be increased not only by changing the ItemHeight but also the ItemWidth.

We have prepared a sample in XAML code with MVVM pattern. Please download the same from the following link

Link: http://www.syncfusion.com/downloads/support/forum/131815/ze/CarouselMVVM65489617 

Please ensure whether the above sample meets your requirement. If not please get back to us by modifying the sample based on your requirement.

Regards,
Hemalatha M. 


Loader.
Live Chat Icon For mobile
Up arrow icon