屏幕截图 我正在使用Visual Studio 2013中的Xamarin Forms开发一个应用程序。我已经设法更改了Android的标题背景颜色,但我未能为Windows项目做同样的事情。它带有默认深色主题。请协助我。谢谢
NavigationPage.BarBackgroundColorProperty Works!感谢您的建议。
你的问题对我来说不是很清楚,但我认为这就是你的意思。对于"标题背景颜色",我认为您是指页面标题的背景颜色。
这是我在 Xamarin.Forms 应用程序中使用的代码。该代码适用于Android,iOS和UWP。
public class ExamplePage : ContentPage
{
public ExamplePage()
{
Title = "Example Page";
BackgroundColor = Color.Blue; //Make this any color you like
Content = null; //put your own content here
}
}
您可以在每个页面上指定背景颜色的颜色。
<StackLayout.BackgroundColor>
<OnPlatform x:TypeArguments="Color"
Android="#51C0D4"
WinPhone="#51C0D4"
iOS="#51C0D4"></OnPlatform>
</StackLayout.BackgroundColor>