Blazor on Avalonia
  • C# 84.7%
  • HTML 13.5%
  • JavaScript 1%
  • PowerShell 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cheapnud be62a36a68
All checks were successful
Build & Test / Build and Test (push) Successful in 1m47s
Publish NuGet / Build, Pack and Publish (push) Successful in 48s
Merge pull request 'Give the JS bridge the same fallback the framework script got' (#5) from b/asset-fallback-layers into master
2026-08-26 14:25:30 +00:00
.forgejo/workflows Address review: cheaper embedded-resource probe, guard ContentLength, anchor the version check 2026-08-25 22:18:38 +02:00
.github/workflows Update dependencies and bump version to 3.3.1 2026-08-22 13:32:01 +02:00
Build Take the script from one scalar path and answer only read requests 2026-08-25 22:23:55 +02:00
CheapAvaloniaBlazor.Tests Give the JS bridge the same fallback the framework script got, and name silent asset failures 2026-08-26 16:20:23 +02:00
Components - Deleted local Services/ISettingsService.cs + Services/SettingsService.cs 2026-02-26 23:04:04 +01:00
Configuration Support private update feeds with an access token 2026-08-22 17:36:32 +02:00
Docs Give the JS bridge the same fallback the framework script got, and name silent asset failures 2026-08-26 16:20:23 +02:00
Extensions Give the JS bridge the same fallback the framework script got, and name silent asset failures 2026-08-26 16:20:23 +02:00
Hosting Support private update feeds with an access token 2026-08-22 17:36:32 +02:00
Models Harden GTK menu bar interop after review 2026-07-07 00:21:43 +02:00
Properties Add project files. 2025-05-18 09:59:28 +02:00
samples Ship blazor.web.js with the app instead of reading the build machine's cache 2026-08-25 22:15:12 +02:00
Services Give the JS bridge the same fallback the framework script got, and name silent asset failures 2026-08-26 16:20:23 +02:00
templates Ship blazor.web.js with the app instead of reading the build machine's cache 2026-08-25 22:15:12 +02:00
Utilities Say plainly what the startup check does and does not promise 2026-08-26 16:23:15 +02:00
Windows Add Velopack auto-update support 2026-08-20 23:32:42 +02:00
wwwroot fix 2026-02-12 00:13:36 +01:00
.gitattributes Add .gitattributes and .gitignore. 2025-05-18 09:59:26 +02:00
.gitignore template engine 2026-02-12 23:55:01 +01:00
build.ps1 fix build 2025-07-31 00:40:35 +02:00
CheapAvaloniaBlazor.csproj Give the JS bridge the same fallback the framework script got, and name silent asset failures 2026-08-26 16:20:23 +02:00
CheapAvaloniaBlazor.slnx Add packaging wiring regression tests 2026-06-11 12:00:37 +02:00
Constants.cs Give the JS bridge the same fallback the framework script got, and name silent asset failures 2026-08-26 16:20:23 +02:00
global.json Update dependencies and bump version to 3.3.1 2026-08-22 13:32:01 +02:00
LICENSE fix author name and github links - they point to a non-existent one. 2025-07-31 00:46:31 +02:00
nuget.exe configuration done, nuget builds 2025-05-18 13:03:40 +02:00
PlatformHelper.cs Install libnotify in the smoke job and probe for it at startup 2026-07-07 01:31:46 +02:00
README.md Slim README down to a landing page 2026-06-11 22:37:09 +02:00
TODO.md Add Velopack auto-update support 2026-08-20 23:32:42 +02:00
TODO_COOKIE_SERVICE.md cookies 2026-03-25 09:49:52 +01:00
TODO_PHOTINO_FORK.md cookies 2026-03-25 09:49:52 +01:00

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.