I'm not seeing any indicators. Perhaps an iOS 14 related thing. I verified the IndicatorView
is present.
<StackLayout Margin="15" Spacing="10">
<Frame BackgroundColor="White"
Padding="10"
BorderColor="Black"
CornerRadius="0">
<CarouselView x:Name="reiCV"
IndicatorView="indicatorView"
HeightRequest="160">
<CarouselView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>h01.png</x:String>
<x:String>h02.png</x:String>
<x:String>h03.png</x:String>
<x:String>h04.png</x:String>
</x:Array>
</CarouselView.ItemsSource>
<CarouselView.ItemTemplate>
<DataTemplate>
<Image Source="{Binding .}"/>
</DataTemplate>
</CarouselView.ItemTemplate>
</CarouselView>
</Frame>
<IndicatorView
IndicatorColor="LightGray"
SelectedIndicatorColor="Black"
IndicatorSize="10"
HorizontalOptions="Center"
x:Name="indicatorView"/>
</StackLayout>
https://github.com/davidortinau/CarouselGallery
Several examples use IndicatorView
. None of them work properly.
I was able to show custom indicators through IndicatorTemplate. Created a frame with rounded corners to mimic a round indicator.
@TiagoPicao-V23437 can you share your code with custom indicator template? I have the same issue with missing indicators iOS 14. And i've tied to make some custom template like you said, but my frame with rounded corners is as big as 40px, even if i said it height/width request should be 5px...
@PawKanarek I did have to tinker a little bit with (and on another screen again due to different layout), but this was working on a very simple layout:
<IndicatorView.IndicatorTemplate>
<DataTemplate>
<Frame HasShadow="False" Padding="3" HeightRequest="3" WidthRequest="3">
<Frame.CornerRadius>
<OnPlatform x:TypeArguments="x:Single">
<On Platform="iOS" Value="5"></On>
<On Platform="Android" Value="10"></On>
</OnPlatform>
</Frame.CornerRadius>
</Frame>
</DataTemplate>
</IndicatorView.IndicatorTemplate>
I think it was adding some padding that helped.
Is this a duplicate of https://github.com/xamarin/Xamarin.Forms/issues/12318 ?
Most helpful comment
@PawKanarek I did have to tinker a little bit with (and on another screen again due to different layout), but this was working on a very simple layout:
<IndicatorView.IndicatorTemplate> <DataTemplate> <Frame HasShadow="False" Padding="3" HeightRequest="3" WidthRequest="3"> <Frame.CornerRadius> <OnPlatform x:TypeArguments="x:Single"> <On Platform="iOS" Value="5"></On> <On Platform="Android" Value="10"></On> </OnPlatform> </Frame.CornerRadius> </Frame> </DataTemplate> </IndicatorView.IndicatorTemplate>
I think it was adding some padding that helped.