What's the proper way to have a CarouselView with an IndicatorView inside a RefreshView?

Rainer 171 Reputation points
2021-02-09T08:35:06.843+00:00

According to this page:

The RefreshView is a container control that provides pull to refresh functionality to its child, provided that the child supports scrollable content. Therefore, pull to refresh is implemented for a CarouselView by setting it as the child of a RefreshView.

But, according to this page, in order to render an IndicatorView directly below the CarouselView it is recommended you use a StackLayout.

So, my question is, how is it recommended to have a CarouselView with its IndicatorView directly below it, but still within a RefreshView? So far I have this:

   <RefreshView>  
       <ScrollView>  
           <StackLayout>  
               <CarouselView>...</CarouselView>  
               <IndicatorView />  
           </StackLayout>  
       </ScrollView>  
   </RefreshView>  

 

It generally works, but has some weird issues. I'm wondering if this is the recommended way to accomplish what I want, or is there a simpler way?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,301 questions
{count} votes