[英]How to change the color of the menu icon on the MasterPageDetalis xamarin.forms?
I'm creating a project and need to change the menu icon, but I have not found a solution yet. 我正在创建一个项目,需要更改菜单图标,但尚未找到解决方案。 How do I change the color of the menu icon in MasterPageDetalis xamarin.forms? 如何更改MasterPageDetalis xamarin.forms中菜单图标的颜色?
Change in your base theme from style.xml 从style.xml中更改基本主题
<style name="MyTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
</style>
<style name="DrawerArrowStyle" parent="@style/Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@color/green</item>
</style>
Please suggest me if i'm wrong 如果我错了,请建议我
In the new version of Forms you would change the ActionBar color (and text color) like this: 在新版本的Forms中,您可以按以下方式更改ActionBar颜色(和文本颜色):
var navigon = new NavigationPage(new WebViewPage());
navigon.BarBackgroundColor = Color.Teal;
navigon.BarTextColor = Color.White;
If you using MasterDetailPage you use override OnAppearing in your MasterDetailPage it should work. 如果您使用MasterDetailPage,则可以在MasterDetailPage中使用覆盖OnAppearing,它将起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.