Skip to content

Latest commit

History

1,105 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

logo

A modern and cross-platform native window framework for .NET that lets you build desktop applications using web technologies load any URL, render HTML strings, or embed a full Blazor application inside a native window

Supports Windows (WebView2), Linux (WebKit2GTK), and macOS (WKWebView)

Note

This project is a modern rework of Photino.Net, Photino.Net.Server, Photino.Blazor and Photino.Native and is not affiliated with or endorsed by the original Photino authors

CI: Platform TestsC# CoverageTypeScript CoveragePython Coverage

Packages

DescriptionPackage
Core window builder and runtimeNuGet
Shared interfaces, types, enums, and delegatesNuGet
Pre-built Blazor components for custom window chromeNuGet
Full Blazor app integration inside a native windowNuGet
ASP.NET Core web app running inside a native windowNuGet
JavaScript and Blazor interop utilitiesNuGet
Single-file executable packagingNuGet

Quick Start

Load a URL in a native window

Install: dotnet add package InfiniLore.InfiniFrame

usingInfiniFrame;varwindow=InfiniFrameWindowBuilder.Create().SetTitle("My App").SetSize(1280,720).Center().SetStartUrl("https://example.com").Build();window.WaitForClose();

Embed a Blazor application

Install: dotnet add package InfiniLore.InfiniFrame.BlazorWebView

usingInfiniFrame.BlazorWebView;varbuilder=InfiniFrameBlazorAppBuilder.CreateDefault(args, w =>w.SetTitle("My Blazor App").SetSize(1280,720).Center());builder.RootComponents.Add<App>("#app");builder.RootComponents.Add<HeadOutlet>("head::after");builder.Build().Run();

BlazorWebView external JS modules (type="module" / CDN imports)

When loading external module origins, explicitly trust them via window builder policy:

varapp=InfiniFrameBlazorAppBuilder.CreateDefault(windowBuilder: wb =>{wb.AddTrustedOrigin("https://xyz");// add redirects too if needed (e.g. cdn.jsdelivr.net, unpkg.com, etc.)});

If you must allow every origin (not recommended outside local/dev scenarios):

varapp=InfiniFrameBlazorAppBuilder.CreateDefault(windowBuilder: wb =>{wb.SetTrustAllOrigins(true);});

Host an ASP.NET Core web app

Install: dotnet add package InfiniLore.InfiniFrame.WebServer

usingInfiniFrame.WebServer;varapp=InfiniFrameWebApplication.CreateBuilder(args).Build().UseAutoServerClose();app.Run();

Architecture

Your Application
│
├── InfiniLore.InfiniFrame ← Core: window builder & runtime
├── InfiniLore.InfiniFrame.BlazorWebView ← Blazor app lifecycle
├── InfiniLore.InfiniFrame.WebServer ← ASP.NET Core integration
│
├── InfiniLore.InfiniFrame.Blazor ← Window chrome Razor components
├── InfiniLore.InfiniFrame.Js ← JS/Blazor interop
│
└── InfiniLore.InfiniFrame.Shared ← Interfaces, types, native interop
└── InfiniFrame.Native (internal) ← C++ platform layer

Only one of BlazorWebView, WebServer, or the core InfiniFrame package is needed for a given application type — they are independent integration paths

Examples

ExampleWhat it demonstrates
BlazorWebViewBasic Blazor app in a native window
WebApp.BlazorBlazor Server hosted via ASP.NET Core
WebApp.ReactReact frontend with custom scheme handler and web messaging
WebApp.VueVue.js frontend with all built-in JS message handlers

Single-File Executable Packing

Use the InfiniLore.InfiniFrame.SingleFile package to publish your app as a single executable with embedded native dependencies. See /docs for full usage details and options

dotnet add package InfiniLore.InfiniFrame.SingleFile
dotnet publish src/MyApp/MyApp.csproj -t:InfiniFrameSingleFile -r win-x64 -c Release

Documentation

Guides

API Reference

Migration

Build Docs Locally

Requirements:

  • Node.js/npm (required)

Run:

npm --prefix docs run dev

Build static site:

npm --prefix docs run build

Platform Requirements

PlatformBrowser EngineRequirement
WindowsWebView2 (Chromium)Windows 10 or later, WebView2 Runtime
LinuxWebKit2GTKGTK 3+
macOSWKWebViewmacOS 10.15 Catalina or later

Run Linux GUI Tests In Docker

The full scripts reference lives in docs:

Local Docker wrappers are under docker/scripts/ (Linux/Windows test runs and Playwright runs). Shared helper scripts (for example NuGet bootstrap) remain in scripts/.

Docker Matrix (Local)

Additional compose targets and wrappers are available for local matrix validation:

  • docker/compose/infiniframe-linux.yml + docker/scripts/docker-linux-*.sh
  • docker/compose/infiniframe-linux-arm64.yml + docker/scripts/docker-linux-arm64-*.sh
  • docker/compose/infiniframe-linux-wayland.yml + docker/scripts/docker-linux-wayland-*.sh
  • docker/compose/infiniframe-windows.yml + docker/scripts/docker-windows-*.ps1

Local GitHub Actions Harness

You can run a local CI harness with a dedicated act runner image:

  • docker/compose/infiniframe-gha-local.yml
  • docker/gha-local/Dockerfile
  • docker/scripts/docker-gha-local-*.sh

Build the local runner image:

bash docker/scripts/docker-gha-local-compose.sh
.\docker\scripts\docker-gha-local-compose.ps1

Run Linux GitHub Actions test workflow locally with act:

bash docker/scripts/docker-gha-local-run-linux-actions.sh
.\docker\scripts\docker-gha-local-run-linux-actions.ps1

Run Windows workflow-equivalent validations in local Windows containers:

.\docker\scripts\docker-windows-compose.ps1
.\docker\scripts\docker-gha-local-run-windows-actions.ps1

Notes:

  • act cannot run native runs-on: windows-* jobs directly. Use the Windows Docker wrappers for local Windows parity.
  • By default local runs set LOCAL_GHA_SKIP_STATUS=1 to skip GitHub status/check API updates.

Repo History

This repo was originally forked from Photino.NET and then the history of the Photino.Blazor and Photino.Net.Server repositories were merged into this. By merging the histories, it was possible to ease further development, especially whilst also preserving the original commit history and attribution from the contributors of Photino

This was also done for the Photino.Native library, but given the extensive work that had already been done, git was seemingly unable to fully merge the commit history without losing the original commit history

License

Unlike the other projects in the InfiniLore ecosystem, this repo follows the same Apache 2.0 License as the original Photino projects

About

A modern evolution of Photino, enabling lightweight, high-performance cross-platform desktop apps with .NET

Resources

Stars

51 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages