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

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:

  1. Bump <Version> in GuiDispatcher.Sharp.WinUI.csproj.
  2. Move the relevant [Unreleased] entries in CHANGELOG.md into a dated release section.
  3. Commit both changes.
  4. 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 Compatible and additional computed target framework versions.
.NET net10.0-windows10.0.19041 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.1.1 92 7/24/2026