目前,我在App.xaml.cs类中使用此代码设置主工具栏背景颜色:
//SET PRIMARY TOOLBAR COLOR
Current.Resources = new ResourceDictionary ();
Color xamarin_color = Color.FromHex ("#3498db");
var navigationStyle = new Style (typeof (NavigationPage));
var barBackgroundColorSetter = new Setter { Property = NavigationPage.BarBackgroundColorProperty, Value = xamarin_color };
navigationStyle.Setters.Add (barBackgroundColorSetter);
Current.Resources.Add (navigationStyle);
navigationPage PRIMARY工具栏正确更改其颜色。但SECONDARY工具栏不会更改其默认颜色(灰色),我找不到任何方法或属性来更改它。 如何更改辅助工具栏的背景颜色?