Deskband11Lib.WinUI 1.2.0

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

Deskband11Lib

NuGet WinUI NuGet WPF Pack and Publish License: MIT

🌐 English | 한국어

Deskband11Lib is a library for building rich, always-visible taskbar companions on Windows 11. It lets your app place real UI content directly inside the taskbar, making compact dashboards, quick controls, status indicators, media widgets, launchers, and productivity tools feel like a native part of the desktop.

Deskband11Lib screenshot

Packages

Deskband11Lib comes in multiple NuGet packages, one for each supported UI framework. A shared Deskband11Lib.Core package holds the taskbar hosting engine. Future frameworks such as Avalonia can be added as additional facade packages.

Package Description
Deskband11Lib.Core Taskbar window discovery, layout calculation, UI Automation measurement, Explorer restart monitoring, and Win32 HWND hosting engine. Independent of any UI framework.
Deskband11Lib.WinUI WinUI 3 facade. Build taskbar widgets with the same WinUI controls, styling, and composition features used by your app.
Deskband11Lib.Wpf WPF facade. Bring WPF-based content into the Windows 11 taskbar with the same simple API.

Highlights

  • Build taskbar-resident widgets using your framework's native controls and styling.
  • Show live information where users can see it at a glance without opening a full window.
  • Add compact controls for actions such as timers, media playback, account switching, build status, device monitoring, or quick launch workflows.
  • Automatically fit content into the available taskbar space without overlapping pinned apps or the notification area.
  • Built-in easing functions (Linear, Sine, Quadratic, Cubic, Quartic, Quintic, Exponential, Circle) for smooth layout animations.
  • Recover cleanly when Explorer restarts by letting the application rebuild its hosted window.
  • WinUI facade supports Windows App SDK apps and NativeAOT publishing.

Install

Choose the package that matches your UI framework:

# WinUI 3
dotnet add package Deskband11Lib.WinUI

# WPF
dotnet add package Deskband11Lib.Wpf

The Deskband11Lib.Core package is pulled in automatically as a transitive dependency.

Basic Usage

WinUI 3

Create a WinUI window, create a TaskbarContentHost, attach it after the initial taskbar layout is ready, then activate the window.

using Deskband11Lib.Core;
using Deskband11Lib.WinUI;

var window = new MainWindow();
var host = new TaskbarContentHost(window, rootElement, new TaskbarContentHostOptions
{
    PreferredWidth = 360,
    PreferredHeight = 48
});

await host.AttachWhenLayoutReadyAsync();
window.Activate();

WPF

The WPF API is identical. The only difference is the UI framework namespace used for Window and FrameworkElement.

using Deskband11Lib.Core;
using Deskband11Lib.Wpf;

var window = new MainWindow();
var host = new TaskbarContentHost(window, rootElement, new TaskbarContentHostOptions
{
    PreferredWidth = 360,
    PreferredHeight = 48
});

await host.AttachWhenLayoutReadyAsync();
window.Show();

Explorer Restart

When Explorer restarts, the taskbar destroys the hosted child window. Handle TaskbarWindowRecreated to replace the window:

host.TaskbarWindowRecreated += async (_, _) =>
{
    await RecreateMainWindowAsync();
};

How It Works

Deskband11Lib gives your app a taskbar-sized surface and keeps that surface aligned with the real taskbar layout. Internally, it uses regular Win32 window parenting:

  • Finds the primary taskbar window, Shell_TrayWnd.
  • Creates or receives a normal framework Window from the application.
  • Changes the window style from popup-style top-level window to child window.
  • Calls SetParent to place the window under the taskbar.
  • Calculates the available rectangle between the taskbar buttons and the notification area, taking taskbar alignment (left or center) into account.
  • Moves and clips the hosted window to that rectangle with SetWindowPos and SetWindowRgn.

Taskbar button width is not reliable from the taskbar child HWND hierarchy alone on current Windows 11 builds, and the taskbar content can be left-aligned or centered. Deskband11Lib therefore uses UI Automation to precisely target the Start button (AutomationId = StartButton) and the optional Widgets button, plus the contiguous taskbar app button group. It also reads the taskbar alignment from the registry (TaskbarAl) and falls back to inferring it from the Start button position. Based on alignment, it picks the more spacious of the two free gaps around the centered Start button group, so content never overlaps the Start button, app buttons, Widgets button, or the notification area. The UI Automation scan runs off the UI thread and is cached so layout refreshes do not block the hosted content.

Options

All options live in Deskband11Lib.Core.TaskbarContentHostOptions and are shared across all facades.

Option Default Description
PreferredWidth 360 Desired content width in effective pixels.
PreferredHeight 48 Desired content height in effective pixels.
AnimateLayoutChanges true Animates taskbar host position and size changes.
LayoutAnimationDuration 500 Layout animation duration in milliseconds.
LayoutAnimationEasing EasingFunctions.CircleOut Easing delegate (Func<double, double>) for layout animation. Built-in non-overshooting functions are provided by Deskband11Lib.Core.EasingFunctions.
Placement Auto Auto picks the more spacious free gap when the taskbar is centered, and falls back to BeforeNotificationArea when left-aligned. BeforeNotificationArea always places content next to the notification area. BeforeStartButton places content next to the Start button and falls back to Auto when the taskbar is not centered.
TrackTaskbarButtons true Enables UI Automation based taskbar button measurement.
TrackNotificationArea true Keeps content away from the notification area.
LayoutRefreshInterval 500 ms Refresh interval for ongoing taskbar layout updates.

Taskbar Alignment

Deskband11Lib detects whether the Windows 11 taskbar is left-aligned or centered by reading the TaskbarAl registry value, falling back to inferring the alignment from the Start button position. Call GetTaskbarAlignment() on a TaskbarContentHost to get a TaskbarAlignment (Left, Center, or Unknown). The detected alignment drives Placement = Auto.

Built-in Easing Functions

Deskband11Lib.Core.EasingFunctions provides these easing functions for LayoutAnimationEasing:

  • EasingFunctions.Linear
  • EasingFunctions.SineIn / SineOut / SineInOut
  • EasingFunctions.QuadraticIn / QuadraticOut / QuadraticInOut
  • EasingFunctions.CubicIn / CubicOut / CubicInOut
  • EasingFunctions.QuarticIn / QuarticOut / QuarticInOut
  • EasingFunctions.QuinticIn / QuinticOut / QuinticInOut
  • EasingFunctions.ExponentialIn / ExponentialOut / ExponentialInOut
  • EasingFunctions.CircleIn / CircleOut / CircleInOut

You can also pass any Func<double, double> delegate for custom easing.

Sample Projects

The snippets above show the core API shape, but a real taskbar companion should follow the sample projects for window lifetime, startup ordering, Explorer restart recovery, and framework-specific hosting details. Start from the sample that matches your UI stack:

  • Deskband11Lib.WinUI.Sample for WinUI 3 and Windows App SDK apps.
  • Deskband11Lib.Wpf.Sample for WPF apps, including the transparent borderless host window setup.

Requirements

  • Windows 11.
  • The target framework must be compatible with your chosen UI framework.
  • WinUI 3 requires Windows App SDK.
  • WPF requires UseWPF=true in the project file.

Project Development

dotnet restore
dotnet build Deskband11Lib.slnx -c Debug
dotnet publish Deskband11Lib.WinUI.Sample\Deskband11Lib.WinUI.Sample.csproj -c Release -r win-x64

Acknowledgements

Special thanks to zadjii and Deskband11. The core idea of bringing application content into the Windows 11 taskbar comes from that project, and Deskband11Lib is grateful for the brilliant inspiration.

License

Deskband11Lib is licensed under the MIT License.

Author

Created by Howon Lee (airtaxi).

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

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 61 6/22/2026
1.1.3 65 6/21/2026
1.1.2 65 6/19/2026
1.1.1 65 6/19/2026
1.1.0 66 6/17/2026