Skip to content

freakdaniel/InfiniFrame

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

912 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Packages

Package Description
NuGet Core window builder and runtime
NuGet Shared interfaces, types, enums, and delegates
NuGet Pre-built Blazor components for custom window chrome
NuGet Full Blazor app integration inside a native window
NuGet ASP.NET Core web app running inside a native window
NuGet JavaScript and Blazor interop utilities

Quick Start

Load a URL in a native window

Install: dotnet add package InfiniLore.InfiniFrame

using InfiniFrame;

var window = 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

using InfiniFrame.BlazorWebView;

var builder = 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();

Host an ASP.NET Core web app

Install: dotnet add package InfiniLore.InfiniFrame.WebServer

using InfiniFrame.WebServer;

var app = 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

Example What it demonstrates
BlazorWebView Basic Blazor app in a native window
BlazorWebView.MultiWindowSample Multiple independent windows with different Blazor components
WebApp.Blazor Blazor Server hosted via ASP.NET Core
WebApp.React React frontend with custom scheme handler and web messaging
WebApp.Vue Vue.js frontend with all built-in JS message handlers

Documentation

Guides

API Reference

  • Window APIIInfiniFrameWindow full reference
  • Builder API — All fluent builder methods
  • Events — Event system reference
  • Types — Enums, value types, and delegates

Migration

Platform Requirements

Platform Browser Engine Requirement
Windows WebView2 (Chromium) Windows 10 or later, WebView2 Runtime
Linux WebKit2GTK GTK 3+
macOS WKWebView macOS 10.15 Catalina or later

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 rework of the Photino.Native, Photino.Net, Photino.Net.Server and Photino.Blazor libraries

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C# 52.7%
  • C++ 30.2%
  • Objective-C++ 7.7%
  • HTML 2.6%
  • TypeScript 1.9%
  • CMake 1.3%
  • Other 3.6%