CarouselView.FormsPlugin Not Properly Working on Xamarin IOS

225 Views Asked by At

I Installed CarouselView.FormsPlugin 6.0.0 on PCL Project It's Working Fine on Android But When I Use On Ios facing Frame height not cover fully on CarouselView ItemTemplate Code:-

<StackLayout>
   <RefreshView>
      <CollectionView x:Name="CollView">
         <CollectionView.ItemTemplate>
           <DataTemplate>
               <cv:CarouselViewControl  HeightRequest="110" AnimateTransition="False" ShowIndicators="True" Position="0" InfiniteScrolling="True" InterPageSpacing="20" VerticalOptions="Fill"  HorizontalOptions="FillAndExpand" IsSwipeEnabled="True" AutoplayInterval="5" IndicatorsTintColor="#E5E5E5"  ItemsSource="{Binding HomeDisplayOffers}" HorizontalIndicatorsPosition="Bottom">                               
     <cv:CarouselViewControl.ItemTemplate >                                      
         <DataTemplate >
               <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                    <Frame Padding="0" HeightRequest="110" "HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                        <!--- Binding Source Code --->
                    </Frame>
                </StackLayout
        </DataTemplate >
    </cv:CarouselViewControl.ItemTemplate>                                      
</cv:CarouselViewControl>
          </DataTemplate>
      </CollectionView.ItemTemplate>
   </CollectionView>
  </RefreshView>
</StackLayout>

pls Check the Attached Screenshot.. Some Frame Coverup and Some Frame Getting Space on Bottom

1

There are 1 best solutions below

6
FreakyAli On

That has nothing to do with the control and everything to do with your XAML code, Giving it a static height is going to obviously do this, options that you have are quite simple to be honest get a container that covers the whole frame like Absolute or Grid

<AbsoluteLayout>
  <cv:CarouselViewControl AnimateTransition="False" ShowIndicators="True" Position="0" InfiniteScrolling="True" InterPageSpacing="20"   AbsoluteLayout.LayoutBounds="0,0,1,1"
             AbsoluteLayout.LayoutFlags="All" VerticalOptions="Fill"  HorizontalOptions="FillAndExpand" IsSwipeEnabled="True" AutoplayInterval="5" IndicatorsTintColor="#E5E5E5"  ItemsSource="{Binding HomeDisplayOffers}" HorizontalIndicatorsPosition="Bottom">                               
 <cv:CarouselViewControl.ItemTemplate >                                      
     <DataTemplate >
                <Frame Padding="0">
                    <!--- Binding Source Code --->
                </Frame>
            </StackLayout
    </DataTemplate >
  </cv:CarouselViewControl.ItemTemplate>                                      
 </cv:CarouselViewControl>
</AbsoluteLayout>