【发布时间】:2016-03-24 17:08:06
【问题描述】:
我是初学者。我有以下最简单的代码:
<Page
x:Class="ClientFramework.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ClientFramework"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
</Grid>
</Page>
我在 Windows mobile 10 模拟器中对其进行了测试。无论我如何更改操作系统主题,深色或浅色,我的应用程序的背景始终是白色的。那么设置依赖于主题的应用范围颜色的正确方法是什么?
【问题讨论】:
-
看看 App.xaml,你有可能在那里设置了
RequestedTheme=Light。 -
@Romasz 完全正确。我自己发布了答案。谢谢。
标签: xaml win-universal-app windows-10