Scroll view is not working in carousel view in Xamarin Form (iOS)

FarrukhFarrukh Member ✭✭

Scroll is not working on iOS but it is working on android when we use scroll view in CarouselViewControl. Is there any better way to do this?

<StackLayout Grid.Row="0" Grid.Column="0" x:Name="pictureDetailAndroid" >
                    <controls:CarouselViewControl x:Name="imgcaro" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
                        <controls:CarouselViewControl.ItemTemplate>
                            <DataTemplate>
                                <ScrollView Orientation="Vertical">
                                    <StackLayout Orientation="Vertical" HeightRequest="700" BackgroundColor="White">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition>
                                                    <RowDefinition.Height>
                                                        <OnPlatform x:TypeArguments="GridLength">
                                                            <On Platform="Android" Value="20*" />
                                                            <On Platform="iOS" Value="20*" />
                                                        </OnPlatform>
                                                    </RowDefinition.Height>
                                                </RowDefinition>
                                                <RowDefinition>
                                                    <RowDefinition.Height>
                                                        <OnPlatform x:TypeArguments="GridLength">
                                                            <On Platform="Android" Value="80*" />
                                                            <On Platform="iOS" Value="80*" />
                                                        </OnPlatform>
                                                    </RowDefinition.Height>
                                                </RowDefinition>
                                            </Grid.RowDefinitions>
                                            <StackLayout BackgroundColor="Black" Grid.Row="0" Padding="0,10,10,10">
                                                <Image Source="{Binding downloadUrl}" Aspect="AspectFit"></Image>
                                            </StackLayout>
                                            <StackLayout Grid.Row="1" Orientation="Vertical" BackgroundColor="White">
                                                <Grid Margin="5">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="50*">
                                                        </ColumnDefinition>
                                                        <ColumnDefinition Width="50*">
                                                        </ColumnDefinition>
                                                    </Grid.ColumnDefinitions>
                                                    <Label Text="Rating" Grid.Row="0" Grid.Column="0" FontAttributes="Bold" FontSize="Default" HorizontalOptions="Start" VerticalOptions="Center">
                                                    </Label>
                                                    <skiarate:RatingView  HeightRequest="30" Grid.Row="0" Grid.Column="1" Count="5" Value="{Binding rating,Mode=TwoWay}" RatingType="Full" IgnorePixelScaling="False" ColorOn="#607913" OutlineOffColor="#607913" OutlineOnColor="#607913" >
                                                        <skiarate:RatingView.GestureRecognizers>
                                                            <TapGestureRecognizer Tapped="RateImages"></TapGestureRecognizer>
                                                        </skiarate:RatingView.GestureRecognizers>
                                                    </skiarate:RatingView>
                                                </Grid>
                                                <BoxView HeightRequest="1" BackgroundColor="LightGray"></BoxView>
                                                <Grid Margin="5">
                                                    <Grid.GestureRecognizers>
                                                        <TapGestureRecognizer Tapped="GetTags"></TapGestureRecognizer>
                                                    </Grid.GestureRecognizers>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="50*">
                                                        </ColumnDefinition>
                                                        <ColumnDefinition Width="40*">
                                                        </ColumnDefinition>
                                                        <ColumnDefinition Width="10*">
                                                        </ColumnDefinition>
                                                    </Grid.ColumnDefinitions>
                                                    <Label Grid.Row="0" Grid.Column="0" Text="Tags" FontAttributes="Bold" FontSize="Default" HorizontalOptions="StartAndExpand" VerticalOptions="Center">
                                                    </Label>
                                                    <Label Grid.Row="0" Grid.Column="1" Text="{Binding commaSeptratedTags}" LineBreakMode="TailTruncation" FontAttributes="Bold" FontSize="Default" HorizontalOptions="Start" VerticalOptions="Center">
                                                    </Label>
                                                    <Image Grid.Row="0" Grid.Column="2" Source="ic_greater.png" WidthRequest="20" HeightRequest="20" HorizontalOptions="End" VerticalOptions="Center">
                                                        <!--<Image.GestureRecognizers>
                                                            <TapGestureRecognizer Tapped="GetTags" />
                                                        </Image.GestureRecognizers>-->
                                                    </Image>
                                                </Grid>


                                            </StackLayout>
                                        </Grid>
                                    </StackLayout>
                                </ScrollView>
                            </DataTemplate>
                        </controls:CarouselViewControl.ItemTemplate>
                    </controls:CarouselViewControl>
                </StackLayout>

Answers

  • YorkGoYorkGo CNMember, Xamarin Team Xamurai
    edited June 2018

    What's you mean "Scroll is not working"? Horizontal scroll didn't work? What's the expected behavior? Please elaborate a bit more.

Sign In or Register to comment.