I previously blogged about the CarouselView and how it is taking over the CarouselPage in 2.2.0. One of the first things that I needed from the new Carousel View were some page indicators. While there is a feature request for this, it will probably be some time before its implemented. As such I thought I would implement my own.
Carousel View Indicator
First I created a view indicator control, that is just a grid and it hosts an image per indicator. At the moment it only allows an image to be an indicator, however I think some good enhancements would be to make the page indicator a data template that you could add anything to.
Binding Carousel View Indicator
Now we just need to bind the Indicator to a common Position and ItemsSource. This allows the CarouselView to update the Position in the indicator and we need the ItemsSource to get the count of the items.
If you want the images I used here they are
If Xamarin implement this feature in the future it will most likely be a lot easier to use since it can be tied up to the internal events. In the meantime enjoy this extension.
Example Project: CarouselView Sample