Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Changing TabbedPage Tab Colors on Android

$
0
0

I cant for the life of me find out how to change the TabbedPage Tab Colors on Forms 1.4+ using an implicit style in code.

I can set the BarBackgroundColor on a NavigationPage but the same options dont exist on TabbedPages.


var navigationPagesStyle = new Style(typeof(NavigationPage)) { Setters = { new Setter { Property = VisualElement.BackgroundColorProperty, Value = NavigationPages.BackgroundColor }, new Setter { Property = NavigationPage.BarBackgroundColorProperty, Value = NavigationPages.BarBackgroundColor }, new Setter { Property = NavigationPage.BarTextColorProperty, Value = NavigationPages.BarTextColor } } }; if (NavigationPages.key == null) { Application.Current.Resources.Add(navigationPagesStyle); } else { Application.Current.Resources.Add(NavigationPages.key, navigationPagesStyle); }

I think I need to know the new Style(typeof(OBJECT)) but I dont know what the proper OBJECT is to put in there.

Anyone have any suggestions? I cant figure out how to change it in a custom renderer either as Android.App.ActionBar.Tab is obsolete now.
Thanks
M


Viewing all articles
Browse latest Browse all 77050

Trending Articles