为什么在 VS 2015 中创建的默认 windows8 通用应用程序具有深色背景

Why the default windows 8 universal app created in VS 2015 has a dark background

我在 Visual Studio 2015 年使用 C# 创建了一个 windows 8 通用应用程序。我按照这条路径创建了一个空项目:Visual C#->Windows->Windows 8->Universal->Blank App(Universal Windows 8.1).

我惊讶地发现空的应用程序以黑色背景和白色前景开始。微软这样做有什么特别的原因吗?

另外,有什么优雅的方法可以改变背景和前景色?我能够通过更改 MainPage.xaml 文件中的以下配置来做到这一点:

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"></Grid>

收件人:

<Grid Background="White"></Grid>

但是我无法更改前景,如果我在 window 中添加一个按钮,则在白色背景上看不到按钮文本,因为按钮前景是white.(据我所知,所有子组件都会继承背景色或前景色,具体取决于它们是什么类型的组件。)

如有任何说明,我们将不胜感激。

参见 MSDN 上 Application.RequestedTheme property 的备注:

There are two built in themes: "Light" and "Dark". By default your app runs using the "Dark" theme (in the themeresources.xaml file, the key name for the "Dark" resources is "Default"). You can set the app's RequestedTheme property to specify which theme is used.

如此设置

<Application ... RequestedTheme="Light">

在您的 App.xaml 中使您的应用程序使用 Light 主题。