GuiDispatcher.Sharp.WinUI
1.1.1
dotnet add package GuiDispatcher.Sharp.WinUI --version 1.1.1
NuGet\Install-Package GuiDispatcher.Sharp.WinUI -Version 1.1.1
<PackageReference Include="GuiDispatcher.Sharp.WinUI" Version="1.1.1" />
<PackageVersion Include="GuiDispatcher.Sharp.WinUI" Version="1.1.1" />
<PackageReference Include="GuiDispatcher.Sharp.WinUI" />
paket add GuiDispatcher.Sharp.WinUI --version 1.1.1
#r "nuget: GuiDispatcher.Sharp.WinUI, 1.1.1"
#:package GuiDispatcher.Sharp.WinUI@1.1.1
#addin nuget:?package=GuiDispatcher.Sharp.WinUI&version=1.1.1
#tool nuget:?package=GuiDispatcher.Sharp.WinUI&version=1.1.1
GuiDispatcher.Sharp.WinUI
WinUI 3 implementation of GuiDispatcher.Sharp for .NET 10 on Windows, backed by Windows App SDK 2.
Use this adapter in WinUI 3 applications that need to expose the UI thread
through the platform-neutral IGuiDispatcher and IGuiTimer contracts.
Install
<PackageReference Include="GuiDispatcher.Sharp.WinUI" Version="1.1.*" />
This package pulls in GuiDispatcher.Sharp 1.1.1 or later, below 2.0, and
Microsoft.WindowsAppSDK 2.3.1 or later, below 3.0.
Usage
Register the application's dispatcher queue explicitly when constructing services:
using GuiDispatcher.Sharp.Contracts;
using GuiDispatcher.Sharp.WinUI;
services.AddSingleton<IGuiDispatcher>(
_ => new WinUiGuiDispatcher(App.MainWindow.DispatcherQueue));
The parameterless constructor is also suitable when dependency injection creates the service on the WinUI UI thread:
services.AddSingleton<IGuiDispatcher, WinUiGuiDispatcher>();
Passing the queue explicitly avoids accidentally trying to resolve it on a worker thread.
await dispatcher.InvokeAsync(async () =>
{
var result = await service.LoadAsync();
viewModel.Apply(result);
});
using var timer = dispatcher.CreateTimer(TimeSpan.FromSeconds(1));
timer.Tick += (_, _) => viewModel.Refresh();
timer.Start();
InvokeAsync(Func<Task>) awaits the entire asynchronous callback without
blocking the dispatcher queue.
Requirements
- Windows 10 version 1809 or later
- .NET 10
- WinUI 3 / Windows App SDK 2.3.1 or later, below 3.0
NuGet publishing
Publishing uses NuGet Trusted Publishing from GitHub Actions, without a stored API key. Configure this policy on nuget.org before pushing the first release tag:
| Field | Value |
|---|---|
| Repository owner | buchmiet |
| Repository | GuiDispatcher.Sharp.WinUI |
| Workflow file | publish-nuget.yml |
| Environment | production |
Releasing
Releases are cut by pushing a vX.Y.Z tag. Before tagging:
- Bump
<Version>inGuiDispatcher.Sharp.WinUI.csproj. - Move the relevant
[Unreleased]entries inCHANGELOG.mdinto a dated release section. - Commit both changes.
- Tag and push:
git tag vX.Y.Z && git push origin vX.Y.Z.
For a coordinated release of the complete package family, follow the family release guide.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows10.0.19041 is compatible. |
-
net10.0-windows10.0.19041
- GuiDispatcher.Sharp (>= 1.1.1 && < 2.0.0)
- Microsoft.WindowsAppSDK (>= 2.3.1 && < 3.0.0)
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.1.1 | 92 | 7/24/2026 |