Why UWP ApplicationPageBackgroundThemeBrush is always white?

Viewed 4790

I am beginner. I have below simplest code:

<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>

I test it in Windows mobile 10 emulator. No matter how I change OS theme, dark or light, my app's background is always white. So what is correct way to set theme-dependent app-wide colours?

2 Answers
Related