【发布时间】:2017-06-29 00:04:53
【问题描述】:
我正在使用便携式 Xamarin 表单解决方案来创建一个可在 IOS、Android 和 Windows 中运行的应用程序。我们在设置导航栏的背景颜色时遇到了问题。 BarBackground 颜色不起作用,因此我们尝试更改每个平台中的颜色,但无法在 Windows 中执行此操作。 提前致谢。
【问题讨论】:
标签: windows xamarin colors xamarin.forms navigationbar
我正在使用便携式 Xamarin 表单解决方案来创建一个可在 IOS、Android 和 Windows 中运行的应用程序。我们在设置导航栏的背景颜色时遇到了问题。 BarBackground 颜色不起作用,因此我们尝试更改每个平台中的颜色,但无法在 Windows 中执行此操作。 提前致谢。
【问题讨论】:
标签: windows xamarin colors xamarin.forms navigationbar
You are using Xamarin.forms. So, change the constructor of App.Xaml.cs in your PCL.
public App()
{
MainPage = new NavigationPage(new Page1())
{
BarBackgroundColor = Color.Gray
};
}
【讨论】: