Deskband11Lib.Core
1.3.8
dotnet add package Deskband11Lib.Core --version 1.3.8
NuGet\Install-Package Deskband11Lib.Core -Version 1.3.8
<PackageReference Include="Deskband11Lib.Core" Version="1.3.8" />
<PackageVersion Include="Deskband11Lib.Core" Version="1.3.8" />
<PackageReference Include="Deskband11Lib.Core" />
paket add Deskband11Lib.Core --version 1.3.8
#r "nuget: Deskband11Lib.Core, 1.3.8"
#:package Deskband11Lib.Core@1.3.8
#addin nuget:?package=Deskband11Lib.Core&version=1.3.8
#tool nuget:?package=Deskband11Lib.Core&version=1.3.8
Deskband11Lib
🌐 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.
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.
- Run multiple instances side by side in the same taskbar area with automatic slot coordination — each instance gets its fair share of the available space.
- Built-in easing functions (Linear, Sine, Quadratic, Cubic, Quartic, Quintic, Exponential, Circle) for smooth layout animations.
- Optional high refresh rate mode that matches the layout animation timer to the target monitor's current refresh rate for smoother motion on high refresh rate displays.
- 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();
};
Secondary Monitor Reconnection
When you set PreferredMonitorIdentity to a secondary monitor's taskbar and that monitor is later disconnected, Deskband11Lib automatically falls back to the primary taskbar. When the secondary monitor is reconnected, the hosted window moves back to the secondary monitor's taskbar automatically — no application code is required.
Multi-Instance Slot Coordination
Deskband11Lib supports running multiple instances in the same taskbar area simultaneously. When several instances target the same placement area on the same monitor, they automatically coordinate via a shared memory slot registry and divide the available space without overlapping each other.
Slot Allocation
Each registered instance is called a slot. Slots are ordered by (ManualSlotPriority, SlotIndex) — lower ManualSlotPriority values place the instance earlier (further from the notification area in left-aligned mode). Among slots with the same ManualSlotPriority, arrival order (SlotIndex) breaks the tie.
Width allocation follows a Fixed-then-Stretch model:
- Fixed slots — instances with a finite
PreferredWidthget their requested width, in priority order, until available space runs out. Lower-priority Fixed slots that do not fit receive whatever remains (which may be zero). - Stretch slots — instances with
PreferredWidth = double.MaxValuesplit the remaining space equally after all Fixed slots are served.
When AllowFixedSlotResize is true (the default) and the available space is too small to serve every resizable Fixed slot at its requested width, those slots shrink proportionally to their PreferredWidth instead of being starved to zero. Non-resizable Fixed slots (AllowFixedSlotResize = false) keep priority-ordered first-served behavior and are served before resizable Fixed slots. Stretch slots always split whatever remains after all Fixed slots are served.
Empty slots leave gaps — the remaining instances do not reflow to fill them.
Manual Slot Priority
By default, all instances have ManualSlotPriority = 65535, which means they are ordered purely by arrival time. Set a lower value to pin an instance ahead of auto-ordered instances:
var host = new TaskbarContentHost(window, rootElement, new TaskbarContentHostOptions
{
PreferredWidth = 200,
ManualSlotPriority = 100
});
Stretch Mode
Set PreferredWidth to double.MaxValue to make an instance stretch to fill whatever space remains after Fixed slots are allocated:
var host = new TaskbarContentHost(window, rootElement, new TaskbarContentHostOptions
{
PreferredWidth = double.MaxValue
});
When all instances in an area are Stretch, they share the space equally.
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, or a secondary monitor's taskbar window,Shell_SecondaryTrayWnd, based onPreferredMonitorIdentity. - Creates or receives a normal framework
Windowfrom the application. - Changes the window style from popup-style top-level window to child window.
- Calls
SetParentto 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
SetWindowPosandSetWindowRgn.
On current Windows 11 builds, the taskbar child HWND hierarchy alone does not expose reliable button widths, and the taskbar content may be left-aligned or centered. Deskband11Lib solves this with UI Automation:
- Button detection. UI Automation precisely targets the Start button (
AutomationId = StartButton), the optional Widgets button, and the contiguous taskbar app button group. - Alignment detection. The library reads the
TaskbarAlregistry value and falls back to inferring alignment from the Start button position. - Gap selection. When centered, it picks the more spacious of the two free gaps around the Start button group, so content never overlaps the Start button, app buttons, Widgets button, or the notification area.
- Secondary monitors. Where the notification area has no dedicated HWND, UI Automation also locates the clock and notification cluster (
AutomationId = SystemTrayIcon/NotifyItemIcon) to compute the right boundary.
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. Set to double.MaxValue for stretch mode — the instance fills remaining space after Fixed-width instances are served. |
AllowFixedSlotResize |
true |
When true and the available space is too small to serve every resizable Fixed slot at its requested PreferredWidth, those slots shrink proportionally to their PreferredWidth instead of being starved to zero. Set to false to keep priority-ordered first-served behavior. |
PreferredHeight |
48 |
Desired content height in effective pixels. |
AnimateLayoutChanges |
true |
Animates taskbar host position and size changes. |
HighRefreshRateMode |
false |
When enabled along with AnimateLayoutChanges, matches the layout animation timer interval to the target monitor's current refresh rate instead of the default 60 FPS. |
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 |
Selects placement.<br>• Auto — When centered, picks the more spacious free gap around the Start button group. Left gap wins → far-left edge (same as LeftEdge); right gap wins → before the notification area. Falls back to BeforeNotificationArea when left-aligned.<br>• LeftEdge — When centered, places content at the far left edge, right after the Widgets button. Falls back to BeforeNotificationArea when left-aligned.<br>• BeforeNotificationArea — Always places content next to the notification area.<br>• BeforeStartButton — Places content next to the Start button. Falls back to BeforeNotificationArea when not centered. |
TrackTaskbarButtons |
true |
Enables UI Automation based taskbar button measurement. |
TrackNotificationArea |
true |
Keeps content away from the notification area. |
PreferredMonitorIdentity |
0 |
Selects which taskbar to host on. 0 uses the primary taskbar (Shell_TrayWnd). 1 uses the first secondary monitor's taskbar (Shell_SecondaryTrayWnd), 2 the next, and so on, ordered left-to-right by screen position. Falls back to the primary taskbar when the requested secondary monitor's taskbar is not present. |
ManualSlotPriority |
65535 |
Controls ordering when multiple instances share the same taskbar area. Lower values place the instance earlier (further from the notification area when left-aligned). Instances with the same value are ordered by arrival time. Default 65535 means auto-ordering by arrival. |
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.LinearEasingFunctions.SineIn/SineOut/SineInOutEasingFunctions.QuadraticIn/QuadraticOut/QuadraticInOutEasingFunctions.CubicIn/CubicOut/CubicInOutEasingFunctions.QuarticIn/QuarticOut/QuarticInOutEasingFunctions.QuinticIn/QuinticOut/QuinticInOutEasingFunctions.ExponentialIn/ExponentialOut/ExponentialInOutEasingFunctions.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.Samplefor WinUI 3 and Windows App SDK apps.Deskband11Lib.Wpf.Samplefor 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=truein 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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows10.0.26100 is compatible. |
-
net10.0-windows10.0.26100
- Microsoft.Windows.SDK.BuildTools (>= 10.0.28000.1839)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Deskband11Lib.Core:
| Package | Downloads |
|---|---|
|
Deskband11Lib.WinUI
WinUI 3 facade for hosting rich application content inside the Windows 11 taskbar. |
|
|
Deskband11Lib.Wpf
WPF facade for hosting rich application content inside the Windows 11 taskbar. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.3.8 | 105 | 7/16/2026 |
| 1.3.7 | 93 | 7/16/2026 |
| 1.3.6 | 106 | 7/15/2026 |
| 1.3.5 | 103 | 7/13/2026 |
| 1.3.4 | 120 | 7/7/2026 |
| 1.3.3 | 107 | 7/6/2026 |
| 1.3.2 | 106 | 7/6/2026 |
| 1.3.1 | 116 | 6/26/2026 |
| 1.3.0 | 122 | 6/26/2026 |
| 1.2.0 | 122 | 6/22/2026 |
| 1.1.3 | 115 | 6/21/2026 |
| 1.1.2 | 112 | 6/19/2026 |
| 1.1.1 | 118 | 6/19/2026 |
| 1.1.0 | 120 | 6/17/2026 |