ZDarkTheme.Wpf 1.2.0

dotnet add package ZDarkTheme.Wpf --version 1.2.0
                    
NuGet\Install-Package ZDarkTheme.Wpf -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ZDarkTheme.Wpf" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZDarkTheme.Wpf" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ZDarkTheme.Wpf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ZDarkTheme.Wpf --version 1.2.0
                    
#r "nuget: ZDarkTheme.Wpf, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ZDarkTheme.Wpf@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ZDarkTheme.Wpf&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=ZDarkTheme.Wpf&version=1.2.0
                    
Install as a Cake Tool

ZDarkTheme.Wpf

A modern dark theme for WPF applications with comprehensive control styling.

Installation

dotnet add package ZDarkTheme.Wpf

Or via NuGet Package Manager:

Install-Package ZDarkTheme.Wpf

Usage

Add to your App.xaml:

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/ZDarkTheme.Wpf;component/Themes/Generic.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

Option 2: Use individual styles

Add to your App.xaml:

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/ZDarkTheme.Wpf;component/Themes/DarkTheme.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

Then apply styles individually:

<Button Style="{StaticResource ZDarkButtonStyle}" Content="Click me"/>
<TextBox Style="{StaticResource ZDarkTextBoxStyle}"/>

Dark Title Bar

Apply dark mode to the Windows title bar (Windows 10 1809+ / Windows 11).

<Window x:Class="MyApp.MainWindow"
        xmlns:dark="clr-namespace:ZDarkTheme.Wpf;assembly=ZDarkTheme.Wpf"
        dark:DarkTitleBar.ApplyDarkMode="True"
        ...>

Option 2: Code-behind

using ZDarkTheme.Wpf;

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        SourceInitialized += (s, e) => DarkTitleBar.Apply(this);
    }
}

Available Styles

Named Styles (use with Style="{StaticResource ...}")

Basic Controls
Control Style Key
Window ZDarkWindowStyle
TextBlock ZDarkTextBlockStyle
TextBox ZDarkTextBoxStyle
PasswordBox ZDarkPasswordBoxStyle
RichTextBox ZDarkRichTextBoxStyle
Label ZDarkLabelStyle
ToolTip ZDarkToolTipStyle
Buttons
Control Style Key
Button ZDarkButtonStyle
Button (Primary) ZDarkPrimaryButtonStyle
ToggleButton ZDarkToggleButtonStyle
CheckBox ZDarkCheckBoxStyle
RadioButton ZDarkRadioButtonStyle
Selection Controls
Control Style Key
ComboBox ZDarkComboBoxStyle
ComboBoxItem ZDarkComboBoxItemStyle
ListBox ZDarkListBoxStyle
ListBoxItem ZDarkListBoxItemStyle
ListView ZDarkListViewStyle
ListViewItem ZDarkListViewItemStyle
GridViewColumnHeader ZDarkGridViewColumnHeaderStyle
Data Display
Control Style Key
DataGrid ZDarkDataGridStyle
DataGridColumnHeader ZDarkDataGridColumnHeaderStyle
DataGridCell ZDarkDataGridCellStyle
DataGridRow ZDarkDataGridRowStyle
TreeView ZDarkTreeViewStyle
TreeViewItem ZDarkTreeViewItemStyle
Control Style Key
TabControl ZDarkTabControlStyle
TabItem ZDarkTabItemStyle
Menu ZDarkMenuStyle
MenuItem ZDarkMenuItemStyle
ContextMenu ZDarkContextMenuStyle
Expander ZDarkExpanderStyle
GroupBox ZDarkGroupBoxStyle
Scrolling & Progress
Control Style Key
ScrollBar ZDarkScrollBarStyle
ScrollViewer ZDarkScrollViewerStyle
ProgressBar ZDarkProgressBarStyle
Slider ZDarkSliderStyle
Date & Time
Control Style Key
DatePicker ZDarkDatePickerStyle
Calendar ZDarkCalendarStyle
CalendarItem ZDarkCalendarItemStyle
CalendarDayButton ZDarkCalendarDayButtonStyle
CalendarButton ZDarkCalendarButtonStyle
Utility
Control Style Key
Separator ZDarkSeparatorStyle
GridSplitter ZDarkGridSplitterStyle
StatusBar ZDarkStatusBarStyle
StatusBarItem ZDarkStatusBarItemStyle
ToolBar ZDarkToolBarStyle
ToolBarTray ZDarkToolBarTrayStyle

Color Resources


<Color x:Key="BackgroundDark">#1a1a1a</Color>
<Color x:Key="BackgroundMedium">#252525</Color>
<Color x:Key="BackgroundLight">#2d2d2d</Color>
<Color x:Key="BorderColor">#3d3d3d</Color>
<Color x:Key="TextPrimary">#e0e0e0</Color>
<Color x:Key="TextSecondary">#9e9e9e</Color>
<Color x:Key="AccentColor">#4a9fc5</Color>
<Color x:Key="SuccessColor">#4caf50</Color>
<Color x:Key="WarningColor">#ff9800</Color>
<Color x:Key="ErrorColor">#f44336</Color>


<SolidColorBrush x:Key="BackgroundDarkBrush"/>
<SolidColorBrush x:Key="BackgroundMediumBrush"/>
<SolidColorBrush x:Key="BackgroundLightBrush"/>
<SolidColorBrush x:Key="BorderBrush"/>
<SolidColorBrush x:Key="TextPrimaryBrush"/>
<SolidColorBrush x:Key="TextSecondaryBrush"/>
<SolidColorBrush x:Key="AccentBrush"/>
<SolidColorBrush x:Key="SuccessBrush"/>
<SolidColorBrush x:Key="WarningBrush"/>
<SolidColorBrush x:Key="ErrorBrush"/>

Font Sizes

<sys:Double x:Key="BaseFontSize">14</sys:Double>
<sys:Double x:Key="FontSizeTiny">10</sys:Double>
<sys:Double x:Key="FontSizeXSmall">11</sys:Double>
<sys:Double x:Key="FontSizeSmall">12</sys:Double>
<sys:Double x:Key="FontSizeMedium">14</sys:Double>
<sys:Double x:Key="FontSizeLarge">16</sys:Double>
<sys:Double x:Key="FontSizeXLarge">18</sys:Double>
<sys:Double x:Key="FontSizeTitle">20</sys:Double>
<sys:Double x:Key="FontSizeHeader">24</sys:Double>

Supported Frameworks

  • .NET 6.0 (Windows)
  • .NET 7.0 (Windows)
  • .NET 8.0 (Windows)

License

MIT License

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0-windows7.0

    • No dependencies.
  • net7.0-windows7.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 211 12/21/2025
1.1.0 173 12/21/2025
1.0.0 174 12/21/2025