CheapAvaloniaBlazor 3.3.0

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

CheapAvaloniaBlazor

Build cross-platform desktop applications using Blazor Server, Avalonia, and Photino.

Combines Blazor Server + MudBlazor + Avalonia + Photino to create native desktop apps with full file system access across Windows, Linux, and macOS using familiar Razor pages and C# components.

NuGet License: MIT .NET

PRE-ALPHA HOBBY PROJECT This is an experimental project developed as a personal hobby. Expect breaking changes, incomplete features, and limited support. Use at your own risk in non-production environments.

Why CheapAvaloniaBlazor?

Use your existing web development skills (HTML, CSS, Blazor, C#) to build desktop applications with native capabilities — no platform-specific UI frameworks, no complex native interop. Good fits: web developers moving to desktop, rapid prototyping, line-of-business tools needing file system access, and Blazor apps that outgrew the browser sandbox.

Quick Start

# Install the project templates
dotnet new install CheapAvaloniaBlazor.Templates

# Create a minimal app (MudBlazor + basic window)
dotnet new cheapblazor -n MyDesktopApp

# Or a full-featured app (tray, notifications, settings, hotkeys, menu bar, multi-window, drag-drop)
dotnet new cheapblazor-full -n MyDesktopApp

cd MyDesktopApp
dotnet run

Prefer manual setup? Add the package to a Razor SDK project and call the fluent builder:

using CheapAvaloniaBlazor.Extensions;
using CheapAvaloniaBlazor.Hosting;

class Program
{
    [STAThread]
    public static void Main(string[] args)
    {
        new HostBuilder()
            .WithTitle("My Desktop App")
            .WithSize(1200, 800)
            .AddMudBlazor()
            .RunApp(args);
    }
}

The Getting Started guide walks through every file of a working app.

Features

  • System tray — icon, context menu, minimize/close-to-tray
  • Notifications — desktop toasts (Avalonia overlay) + OS notification center (Web Notification API)
  • Settings persistence — JSON key-value and typed-section APIs with auto-save
  • App lifecycle events — minimize/maximize/restore/focus events, close cancellation
  • Theme detection — OS dark/light mode with runtime change events
  • Global hotkeys — system-wide shortcuts on Windows (Win32) and Linux (D-Bus portal / X11)
  • Native menu bar — Win32 menu with mnemonics, accelerators, checkable items (Windows)
  • Multi-window — child windows, modal dialogs, inter-window messaging
  • Drag-and-drop files — HTML5 drag events bridged to C#
  • Desktop interop — file dialogs, window management, clipboard, system paths
  • Splash screen — enabled by default, fully customizable
  • Diagnostics — comprehensive startup and operation logging

Every feature with code samples: Features guide.

Documentation

Also browsable on the project wiki.

Samples

Contributing & Support

Found a bug? Open an issue. Testing on Linux/macOS and documentation feedback are especially welcome. This is a hobby project — support is best-effort.

License

MIT — use freely in personal and commercial projects. Built on Avalonia, Blazor, MudBlazor, and Photino.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CheapAvaloniaBlazor:

Package Downloads
CheapHelpers.Avalonia.Bridge

Bridge package integrating CheapAvaloniaBlazor desktop notifications with CheapHelpers notification system. Provides DesktopNotificationChannel adapter allowing desktop OS notifications to participate in the unified notification system.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.3.0 0 8/21/2026
3.2.0 531 6/11/2026
3.1.2 120 6/10/2026
3.1.1 158 5/9/2026
3.1.0 118 5/9/2026
3.0.0 542 2/27/2026
2.1.1 204 2/12/2026
2.0.2 173 1/29/2026
2.0.1 141 1/29/2026
2.0.0 151 1/28/2026
1.2.4 145 1/27/2026
1.2.2 134 1/27/2026
1.2.0 222 1/24/2026
1.1.5 139 1/22/2026
1.1.4 287 1/10/2026
Loading failed

Version 3.3.0 - Velopack auto-updates: WithVelopackUpdates(repoUrl) checks a Gitea/Forgejo or GitHub releases feed in the background and IUpdateService lets the UI apply on restart. Linux is now a working platform: a first-boot crash (Photino WindowHandle throwing on non-Windows) is fixed, startup validates the environment (display, GTK, WebKitGTK, libnotify, glibc) with actionable install hints and a CHEAPBLAZOR_SKIP_STARTUP_CHECKS escape hatch, modal windows disable their parent via a new GTK backend, and the native menu bar renders through GTK above the webview; a CI smoke test boots the framework on Linux on every change. The ConfigurePipeline hook now runs before UseAntiforgery so consumer auth middleware lands in the recommended order. Dependency updates: Avalonia 12.1.0, MudBlazor 9.7.0, Tmds.DBus.Protocol 0.94.2.