百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

NanUI

> 前端框架
开源

NanUI 是一个面向希望使用 HTML、CSS 和 JavaScript 创建 Windows 桌面应用程序的开发者的 开源 .NET 项目。

3.8K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

NanUI 是一个面向希望使用 HTML、CSS 和 JavaScript 创建 Windows 桌面应用程序的开发者的 开源 .NET 项目。

The NanUI Project

Easily build powerful WinForm applications with HTML, CSS and JavaScript.

NanUI

点击[此处]切换到简体中文仓库首页。

⭐ About

NanUI is an open source framework on .NET platform for creating user interface for WinForm Applications using HTML5, CSS3, and JavaScript. It is based on the Xilium.CefGlue project, which is a .NET wrapper around the Chromium Embedded Framework.

If you are looking for a framework for creating a WinForm application with a modern user interface, NanUI is a good choice. you can use HTML, CSS, and JavaScript to create a user interface, and use C# to write the business logic of the application.

Please give NanUI project a star⭐ if you like it.

If this project helps, please consider funding it.

✨ Recommended for developers interested in WebView2

If you think that NanUI based on CEF is too heavy, you can try the WinFormedge project now. It is a lightweight WinForm framework based on WebView2 as the core. Suitable for developers who do not want to integrate libcef, using WinFormege and cooperating with the WebView2 that comes with the Windows system will effectively reduce the size of the application release package.

After testing, the size of the .NET 8.0 x64 + WinFormedge application packaged with ZIP compression is only 36MB, while the application packaged with NanUI is at least 125M after compression.

But it should be noted that applications created with WinFormedge can only run on Windows 10 and Windows 11, while NanUI supports Windows 7 SP1 and above.

  • GitHub - WinFormedge
  • Gitee - WinFormedge

️ Requirements

For Development

  • .NET Framework 4.6.2 or higher / .NET 6.0 or higher
  • Visual Studio 2019 or higher (VS2022 is recommended)

For Deployment

  • Microsoft Windows 7 Service Pack 1 or higher
  • .Net Framework 4.6.2 or higher
  • .NET 6.0 for Windows 7 and higher.
  • .NET 7.0/8.0 for Windows 10 and higher.

This is a Windows Only framework, it can not run on Linux or Mac OS.

The minimum supported Windows is Windows 7 Service Pack 1, and some features (such as DirectComposition Offscreen Rendering) are not supported on Windows 7.

Getting Started

Create a simple NanUI Application by following the steps below:

1. Create a WinForm Application by default template.

2. Install NanUI NuGet Package

Open the NuGet Package Manager to install or use NuGet Package Manager Console, and run the following command to install NanUI nuget package:

powershell
PM> Install-Package NetDimension.NanUI

Install the dependencies of Chromium Embedded Framework that NanUI depends on:

powershell
PM> Install-Package NetDimension.NanUI.Runtime

3. A basic NanUI application requires the following code:

Modify the code in the Program.cs file as follows:

csharp
using WinFormium;

class Program
{
    [STAThread]
    static void Main(string[] args)
    {
        var builder = NanUIApp.CreateBuilder();

        builder.UseNanUIApp<MyApp>();

        var app = builder.Build();

        app.Run();
    }
}

Create a class implements NanUIAppStartup for configuring the application:

…

Create a class implements Formium for configuring the main window of the application:

csharp
using NetDimension.NanUI;
using NetDimension.NanUI.Forms;

class MyWindow : Formium
{
    public MyWindow()
    {
        Url = "https://www.google.com";
    }

    protected override FormStyle ConfigureWindowStyle(WindowStyleBuilder builder)
    {
        // Configure the style of the window here or leave it blank to use the default style

        var style = builder.UseSystemForm();

        style.TitleBar = false;

        style.DefaultAppTitle = "My first WinFomrim app";

        return style;
    }
}

4. Build and run your NanUI application

Documentation

For more info please see - Documentation

Demos

  • Minimal WinFormium App - Introduction to the basic usage of WinFormium.

Third-Party References & Tools

  • CEF - https://bitbucket.org/chromiumembedded/cef
  • Xilium.CefGlue - https://gitlab.com/xiliumhq/chromiumembedded/cefglue/
  • Vanara.Library - https://github.com/dahall/Vanara
  • Vortice.Windows - https://github.com/amerkoleci/Vortice.Windows
  • SkiaSharp - https://github.com/mono/SkiaSharp
  • React - https://github.com/facebook/react
  • React-Router - https://github.com/remix-run/react-router
  • Vite - https://github.com/vitejs/vite

Inspirations

I was inspired by the following songs and albums when creating this version of WinFormium.

  • Strandels - Chance Of Rain
  • One Direction - What a Feeling (Made In The A.M.)
  • Thomas Rhett - VHS (Center Point Road)
  • Sammy Kershaw - She Don't Know She's Beautiful (Haunted Heart)
  • Chrissy Steele - Two Bodies (Magnet To Steele)
  • Halestorm - I Like It Heavy (Into the Wild Life)
  • Joan Jett & The Blackhearts - I Hate Myself for Loving You (Up Your Alley)

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#cefcefgluechromiumdesktop

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架