0

屏幕截图我正在使用 Visual Studio 2013 中的 Xamarin Forms 开发应用程序。我已设法更改 Android 的标题背景颜色,但我未能为 Windows 项目做同样的事情。它带有默认深色主题。请帮助我。谢谢你

4

3 回答 3

2

NavigationPage.BarBackgroundColorProperty 有效!谢谢你的建议。

于 2017-01-20T10:38:00.543 回答
0

你的问题对我来说不是很清楚,但我认为这就是你的意思。对于“标题背景颜色”,我认为您的意思是页面标题的背景颜色。

这是我在 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
    }
}

您可以指定每页背景颜色的颜色。

于 2017-01-18T14:59:08.573 回答
0
 <StackLayout.BackgroundColor>
            <OnPlatform x:TypeArguments="Color"
                                    Android="#51C0D4"
                                    WinPhone="#51C0D4"
                                    iOS="#51C0D4"></OnPlatform>
    </StackLayout.BackgroundColor>
于 2017-01-20T11:50:42.257 回答