GuiDispatcher.Sharp.Wpf 1.1.2

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

GuiDispatcher.Sharp.Wpf

WPF implementation of GuiDispatcher.Sharp for .NET 10 on Windows.

Use this adapter in WPF applications that need to expose the UI thread through the platform-neutral IGuiDispatcher and IGuiTimer contracts.

Install

<PackageReference Include="GuiDispatcher.Sharp.Wpf" Version="1.1.*" />

This package pulls in GuiDispatcher.Sharp 1.1.2 or later, below 2.0. WPF is provided by the Microsoft.WindowsDesktop.App.WPF framework included with .NET for Windows.

Usage

Register the application dispatcher explicitly when constructing services:

using GuiDispatcher.Sharp.Contracts;
using GuiDispatcher.Sharp.Wpf;

services.AddSingleton<IGuiDispatcher>(
    _ => new WpfGuiDispatcher(Application.Current.Dispatcher));

The parameterless constructor is also suitable when dependency injection creates the service on the WPF UI thread:

services.AddSingleton<IGuiDispatcher, WpfGuiDispatcher>();

If no Application exists, the parameterless constructor requires a dispatcher to have already been created on the current thread. Passing the dispatcher explicitly avoids accidentally binding the adapter to a worker thread.

await dispatcher.InvokeAsync(() =>
{
    viewModel.Apply(result);
});

using var timer = dispatcher.CreateTimer(TimeSpan.FromSeconds(1));
timer.Tick += (_, _) => viewModel.Refresh();
timer.Start();

InvokeAsync(Func<Task>) unwraps WPF's DispatcherOperation<Task>, so the returned task completes only after the asynchronous callback finishes.

Requirements

  • Windows
  • .NET 10 (net10.0-windows)
  • WPF

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.Wpf
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.Wpf.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-windows7.0 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.2 97 8/15/2026
1.1.1 122 7/24/2026