Xamarin forms Tabbed page

Xamarin forms Tabbed page

When developing cross platform apps with Xamarin forms, you notice that your apps will look and feel right at home on each OS. This because the nice people of Xamarin render each Xamarin forms control as a native control with the needed control properties all filled in.

You can still tweak some of these properties when they are leveraged through the Xamarin forms control abstraction or use custom renderers and effects to get down to the native control layer. I stress hack, because of the current TabbedPage implementation in Xamarin forms there is no direct way to handle this.

Searching for a solution, I needed to open up the source code of Xamarin forms, fortunately it open source

If you go to the TabbedPageRenderer that is used for UWP, you see that a specific XAML style is used for the Pivot control. This style is called TabbedPageStyle!

Like I said this is a hack but it works perfectly instead of using the default Xamarin forms TabbedPageStyle inside the Pivot header template we now be using our own TabbedPageStyle2.

Only one small detail remains, you notice I added a converter inside the Style. This was needed because the Icon property on the NavigationPage of Xamarin forms maps to a FileImageSource but that is not processable straight away as a source value for the Image control inside UWP.
Xamarin forms Tabbed page