All Articles

C#/WinUI

[WinUI] WindowsAppSDK 다크 테마

아래와 같이 xaml에 RequestedTheme="Dark" 속성 추가

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="using:WindowsSdkSampleApp"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:Custom="using:Windows.UI.Xaml.Controls.Maps"
      x:Class="WindowsSdkSampleApp.MainPage"
      mc:Ignorable="d"
      Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
      RequestedTheme="Dark">
    <Grid>
        <NavigationView>
        </NavigationView>
    </Grid>
</Page>

결과 화면

'C# > WinUI' 카테고리의 다른 글

[WinUI] Card Design with SplitView  (0) 2021.07.25