Hi,
We're testing currently the SfCarousel control for our app. On one page we're planning a list of carousels e.g.:
<listitem>
Title
Caroursel
</listitem>
<listitem>
Title
Carousel
</listitem>
...
Each SfCarousel Item has to be a Grid- or Stacklayout with some subelements e.g. Labels and Images. I read that the carousel allows to add content view types (https://www.syncfusion.com/forums/124165/carousel-with-contentview) but the download link for the example does not work (anymore?).
I tried the following code for each element:
<?xml version="1.0" encoding="UTF-8"?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TPApp.gui.views.category.CategoryHomeListView"
xmlns:carousel="clr-namespace:Syncfusion.SfCarousel.XForms;assembly=Syncfusion.SfCarousel.XForms" >
<Grid RowSpacing="0" ColumnSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.Resources>
<ResourceDictionary>
<DataTemplate x:Key="tpProductItemTemplate">
<Grid RowSpacing="0" ColumnSpacing="0" VerticalOptions="Center" HorizontalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Source="{Binding sImageUrl}" VerticalOptions="Center" HorizontalOptions="Center" Grid.Row="0"
Grid.Column="0" />
</Grid>
</DataTemplate>
</ResourceDictionary>
</Grid.Resources>
<carousel:SfCarousel x:Name="tpProductCarousel" HeightRequest="400" WidthRequest="400" Grid.Row="0"
Grid.Column="0" ItemTemplate="{StaticResource tpProductItemTemplate}" />
</Grid>
</ContentView>
The carousel is showing, but is "cutting" the content. That means the selected image is not displayed completely but only the half (bottom).
I tried it with Gridlayout, StackLayout - and wrapping each with ContentViews... but was not able to solve that problem.
Is there some trick to prevent that behaviour?
Thank you very much.
Alex