Oakrey.Applications.UI 3.0.5

dotnet add package Oakrey.Applications.UI --version 3.0.5
                    
NuGet\Install-Package Oakrey.Applications.UI -Version 3.0.5
                    
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="Oakrey.Applications.UI" Version="3.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Oakrey.Applications.UI" Version="3.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Oakrey.Applications.UI" />
                    
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 Oakrey.Applications.UI --version 3.0.5
                    
#r "nuget: Oakrey.Applications.UI, 3.0.5"
                    
#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 Oakrey.Applications.UI@3.0.5
                    
#: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=Oakrey.Applications.UI&version=3.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Oakrey.Applications.UI&version=3.0.5
                    
Install as a Cake Tool

Oakrey.Applications.UI

A WPF UI library for .NET 10 that provides a DarkWindow base class with native DWM Mica/Acrylic backdrops, a ready-made TabbedWindow with animated page transitions and automatic Windows light/dark theme tracking, a thread-safe notification bar service, and severity-typed message box and prompt dialogs.

  • Package: Oakrey.Applications.UI
  • Target framework: .NET 10 (Windows / WPF)
  • License: MIT

Main features

  • DarkWindowWindow subclass that calls into dwmapi.dll to extend the DWM frame, enable immersive dark mode, and apply a native backdrop (Mica by default). Requires no additional configuration.
  • TabbedWindow � full-featured navigation shell with a side-menu tab list, animated page transitions (fade + slide), optional bottom and left widget slots, configurable menu width, app version label, and automatic Windows light/dark theme following via a registry watcher.
  • BackgroundTypeAuto, None, Mica, Acrylic, Tabbed � configurable per TabbedWindow instance via a dependency property.
  • WindowsThemeAuto, Light, Dark � trackable and overridable; theme changes raise ThemeChangedEventArgs.
  • NotificationService � static service with Error, Warning, Info, Progress factory methods and persistent/cancellable variants. Thread-safe; works before a NotificationBar is registered (null-object pattern).
  • NotificationBarUserControl that self-registers with NotificationService on construction. Hosts an ObservableCollection<INotification> bound to the UI.
  • INotification / INotificationBar � interfaces enabling custom notification rendering or testing without a real UI.
  • MsgBox � static helper with Show / ShowDialog overloads accepting message, title, Severity, and optional details string. Marshals to the UI thread automatically.
  • Prompt � static helper for typed input dialogs: String, Int, Double, ComboBox, dynamic enum buttons, and the standard YesNo, OkCancel, YesNoCancel, SaveCloseCancel button sets.
  • LoggerMessageBoxExtensionsILogger extension methods that log and immediately show a matching MsgBox: ShowError, ShowWarning, ShowInfo, ShowSuccess, ShowDialogError, etc.

Project structure

UI/
  DarkWindow.cs                        # DWM dark window base class
  Notifications/
    INotification.cs                   # Notification handle interface
    INotificationBar.cs                # Bar registration interface
    Icon.cs                            # Notification icon enum
    IconConverter.cs                   # Icon-to-resource converter
    Notification.cs                    # Default INotification implementation
    NotificationBar.xaml/.cs           # UserControl - rendered notification list
    NotificationService.cs             # Static notification factory
    CloseNotification.cs               # Close-button notification subtype
  Prompts/
    Severity.cs (in Prompt.cs)         # ERROR / WARNING / EXCEPTION / SUCCESS / INFO
    Prompt.cs                          # Static typed input dialog helpers
    MsgBox.cs                          # Static message box helpers
    LoggerMessageBoxExtensions.cs      # ILogger + MsgBox bridge extensions
    DynamicButtonsWindow.xaml/.cs      # Enum-driven button dialog
    DynamicButtonsCreator.cs
    PromptBoxString/Int/Double.xaml/.cs
    ComboBoxWindow.xaml/.cs
    MessageBoxGeneral.xaml/.cs
  TabbedWindow/
    TabbedWindow.cs                    # Main navigation shell Window
    TabWindowItem.cs                   # Tab descriptor (label, glyph, page Uri)
    BackgroundType.cs                  # DWM backdrop enum
    WindowsTheme.cs                    # Theme enum
    ThemeWatcher.cs                    # Registry-based theme change watcher
    ThemeChangedEventArgs.cs
    DwmNative.cs                       # P/Invoke wrappers for dwmapi.dll
    Glyph.cs / GlyphConverter.cs       # Icon glyph support

Architecture

graph TD
    App["Your App.xaml.cs"] --> TabbedWindow
    App --> DarkWindow

    TabbedWindow --> ThemeWatcher["ThemeWatcher<br>(registry watcher)"]
    TabbedWindow --> DwmNative["DwmNative<br>(dwmapi P/Invoke)"]
    TabbedWindow --> TabWindowItem["TabWindowItem list<br>(label, glyph, page Uri)"]

    DarkWindow --> dwmapi["dwmapi.dll<br>(DwmExtendFrameIntoClientArea<br>DwmSetWindowAttribute)"]

    NotificationBar["NotificationBar (UserControl)"] --> NotificationService["NotificationService (static)"]
    NotificationService --> INotificationBar
    NotificationService --> INotification

    MsgBox["MsgBox (static)"] --> Invoker["Oakrey.Async.Windows.Invoker<br>(UI thread marshal)"]
    Prompt["Prompt (static)"] --> Invoker
    LoggerExt["LoggerMessageBoxExtensions"] --> MsgBox
    LoggerExt --> ILogger["Oakrey.Log.ILogger"]

Requirements

  • .NET 10 or higher
  • Windows (WPF)
  • Windows 11 or Windows 10 build 22000+ recommended for Mica/Acrylic backdrops

Installation

.NET CLI

dotnet add package Oakrey.Applications.UI

Package Manager Console

Install-Package Oakrey.Applications.UI

NuGet Package Manager

  1. Open Visual Studio.
  2. Navigate to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
  3. Search for Oakrey.Applications.UI and click Install.

Example usage

DarkWindow

Inherit from DarkWindow instead of Window. No additional code is required; the Mica backdrop and dark title bar are applied automatically.

<ui:DarkWindow x:Class="MyApp.MainWindow"
               xmlns:ui="clr-namespace:Oakrey.Applications.UI;assembly=Oakrey.Applications.UI"
               Title="My App" Width="1000" Height="700">
    
</ui:DarkWindow>

TabbedWindow

<ui:TabbedWindow x:Class="MyApp.MainWindow"
                 xmlns:ui="clr-namespace:Oakrey.Applications.UI.TabbedWindow;assembly=Oakrey.Applications.UI"
                 Theme="Auto"
                 BackgroundType="Mica"
                 AppVersion="1.0.0"
                 MenuWidth="220">
    <ui:TabbedWindow.Tabs>
        <ui:TabWindowItem Label="Dashboard" Page="/Pages/DashboardPage.xaml"/>
        <ui:TabWindowItem Label="Settings"  Page="/Pages/SettingsPage.xaml"/>
    </ui:TabbedWindow.Tabs>
</ui:TabbedWindow>

NotificationBar

Place the control once in your shell window XAML. It self-registers with NotificationService on construction.

<notifications:NotificationBar
    xmlns:notifications="clr-namespace:Oakrey.Applications.UI.Notifications;assembly=Oakrey.Applications.UI"
    VerticalAlignment="Bottom"/>

Trigger notifications from anywhere in the application:

NotificationService.Info("File loaded successfully.");
NotificationService.ErrorPersistent("Connection lost.");

INotification progress = NotificationService.ProgressCancellable("Uploading...");
// later:
progress.Close();

MsgBox

MsgBox.Show("Operation failed.", Severity.ERROR, exception.Message);
MsgBox.ShowDialog("Confirm deletion?", "Delete record", Severity.WARNING);

Prompt

if (Prompt.String(out string? name, "Enter your name", "Name"))
{
    // name is set
}

if (Prompt.Int(out int count, "Enter count", "Count"))
{
    // count is set
}

if (Prompt.YesNo(out YesNo result, "Save changes?", "Confirm"))
{
    // result == YesNo.Yes or YesNo.No
}

ILogger extensions

// Logs via Oakrey.Log and shows a MsgBox in one call
logger.ShowError("Export failed", exception);
logger.ShowWarning("Low disk space", "Only {0} MB remaining", freeMb);

Development notes

  • NotificationService uses a null-object NullNotificationBar before any NotificationBar is registered, so notification calls are always safe and do not throw.
  • All MsgBox and Prompt methods marshal to the UI thread internally via Oakrey.Async.Windows.Invoker, making them safe to call from background threads.
  • ThemeWatcher monitors HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize via WMI event subscription and raises ThemeChanged on change.
  • DwmNative and DarkWindow both call dwmapi.dll directly via P/Invoke. AllowUnsafeBlocks is required and is already set in the project file.
  • To create a custom notification renderer, implement INotificationBar and register it with NotificationService.RegisterNotificationBar(bar).

Project information

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

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Oakrey.Applications.UI:

Package Downloads
Oakrey.Applications.License

Provides application license management for .NET WPF apps: signature and threshold-based validation, trial and expiration support, reactive license status via IObservable<bool>, custom exception types, and a ready-made LicenseWindow WPF dialog.

Oakrey.Applications.About

A WPF/.NET library providing an About dialog with application name and version display, loaded assembly/module version listing, RTF EULA rendering, and a Report Issue form with log folder access.

Oakrey.Applications.UserPrompts.Custom

Custom WPF implementation of UserPrompts.Abstractions with enhanced styled dialogs. Features custom-designed prompts with severity-based styling, integrated logging, and modern UI. Includes support for information messages, questions, user input, and selections with professional Oakrey design language.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.5 93 5/15/2026
3.0.4 140 3/13/2026
3.0.3 120 3/11/2026
3.0.2 149 2/11/2026
3.0.1 122 1/16/2026
3.0.0 449 11/18/2025
2.0.0 232 10/22/2025
1.3.1 198 10/10/2025
1.3.0 205 10/7/2025
1.2.1 243 9/29/2025
1.2.0 226 9/23/2025
1.1.0 231 9/23/2025
1.0.0 346 4/17/2025