WPF 어플리케이션을 현대식 UI로 개발할 수 있는 라이브러리를 소개합니다.
GitHub - Kinnara/ModernWpf: Modern styles and controls for your WPF applications
이 라이브러리를 이용하면 윈도우즈 Dark/Light 모드를 감지하여 기본 테마로 선택합니다.
<Window x:Class="CSWin.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Test"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<ui:SimpleStackPanel Margin="12" Spacing="24">
<TextBlock Text="My first ModernWPF app" Style="{StaticResource HeaderTextBlockStyle}" />
<Button Content="I am a button" />
<Button Content="I am an accent button" Style="{StaticResource AccentButtonStyle}" />
</ui:SimpleStackPanel>
</Grid>
</Window>
.NET Core 3.1 및 .NET 5도 잘 지원합니다.
WPF를 이용해 어플리케이션을 만들 때 유용한 라이브러리라 생각됩니다.