The Windows Framework supports two App themes, Dark and Light. The Dark theme has a black background and the Light theme has a white background. The default theme of the app is the Dark theme.
The RequestedTheme property of the application sets the theme of the application. To change an app theme from Dark to Light, open App.xaml and change the RequestedTheme value to Light.
The following code snippet sets the app theme to Light at design-time, in XAML.
- <Application
- x:Class="HelloWindows.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:HelloWindows"
- RequestedTheme="Light">
- </Application>
You can also set the theme in your code at run-time by setting the RequestedTheme property to ApplicationTheme.Light.
The following code snippet sets the app theme to Light.
- this.RequestedTheme = ApplicationTheme.Light;