当前,我使用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工具栏不会更改其默认颜色(灰色),并且我找不到任何方法或属性可以对其进行更改。如何更改辅助工具栏的背景颜色?
您找到解决方案了吗?我也在寻找一种将图标添加到辅助菜单并使之更加时尚的方法。