MewUIDesktop apps in C#, shipped as one small native file.

A cross-platform, code-first .NET GUI framework. Apps publish as a single native executable of a few megabytes and run with no .NET runtime installed. No XAML, no designer.

Run the demo in your browserGitHub681NuGet14.2K

MIT licensed. .NET 8.0 / 10.0. Latest release 0.21.1.

The MewUI Gallery sample with the light themeThe same sample with the dark themeLightDark
Move across to compare, click to see more of the window. One theme object, switched at runtime.
The MewUI Gallery sample with the light themeThe same sample with the dark themeLightDark

Getting started

Open it in the browser, run one command, or add the package to a project. Ordered by what each one asks of you.

  1. 1

    In your browser

    Nothing to install. The Gallery sample is the same code compiled to WebAssembly.

  2. 2

    One command

    Needs the .NET 10 SDK, nothing else. No clone, no project, no template. This downloads and runs code from GitHub.

    curl -sL https://raw.githubusercontent.com/aprillz/MewUI/refs/heads/main/samples/FBASample/fba_gallery.cs -o - | dotnet run -
  3. 3

    In your own project

    One metapackage brings the core, the platform hosts and the rendering backends.

    dotnet add package Aprillz.MewUI

Highlights

The framework optimizes for one thing: a small, self contained desktop app that starts fast.

NativeAOT and trimming first

Explicit code with no reflection, so NativeAOT publishes it as one native executable that runs with no .NET runtime installed.

Small by design

An AOT build comes out at 3.39 MB for a Hello World window and 7.75 MB for the full control gallery.

C# markup, no XAML

Build the UI tree with a fluent API in plain C#. Analyzers and a formatter help you write it, and the window preview runs in the major IDEs.

One codebase, four targets

Windows, Linux/X11 and macOS desktop hosts, plus a WebAssembly build that runs the same UI in the browser.

Deployment size

The main executable of a NativeAOT publish. The two figures below are macOS arm64 / MewVG.

3.39 MB

Hello World

7.75 MB

Gallery, the full control showcase

Platform / backendHello WorldGallery
Windows x64 / GDI3.45 MB8.33 MB
Windows x64 / Direct2D3.61 MB8.45 MB
Windows x64 / MewVG3.84 MB8.69 MB
macOS arm64 / MewVG3.39 MB7.75 MB
Linux x64 / X11 + MewVG4.78 MB9.66 MB

The whole app is C#

Controls are composed with a fluent API. There is no markup file, no designer and no generated partial class behind the window.

var window = new Window()
    .Title("Hello MewUI")
    .Resizable(520, 360)
    .Padding(12)
    .Content(
        new StackPanel()
            .Spacing(8)
            .Children(
                new Label()
                    .Text("Hello, Aprillz.MewUI")
                    .FontSize(18)
                    .Bold(),
                new Button()
                    .Content("Exit")
                    .OnClick(Application.Shutdown)));

Application.Run(window);

Bindings without reflection

A source is an observable value, an INotifyPropertyChanged view model, or another element's property, and nested paths work too. Paths are resolved at compile time, so trimming and AOT keep working.

var percent = new ObservableValue<double>(
    initialValue: 0.25,
    coerce: value => Math.Clamp(value, 0, 1));

var slider = new Slider()
    .BindValue(percent);

var label = new Label()
    .BindText(percent, value => $"Percent ({value:P0})");

// Nested path. Rewired when Customer is replaced.
var city = new TextBlock()
    .Bind(TextBlock.TextProperty, order, x => x.Customer.City);

Tools while you build

Code first does not mean flying blind. The preview draws your window in the editor, and the running app takes your edits as you type.

Editor preview

Renders a Window or UserControl in an editor panel without launching the app. Visual Studio, VS Code and Rider. The session builds once, then every save redraws the panel.

Hot reload

Run under dotnet watch and edits reach the running app. MewUI rebuilds only the nodes whose build code changed, and nothing is declared to enable it.

DevTools

Look into the running app: its visual tree and the properties of any element, in a window beside it. A frame statistics overlay and a profiler timeline come with it.

Analyzers

Roslyn analyzers and refactorings for fluent markup: turn an object initializer into a chain, expand or collapse one, merge statements into it.

Built to be driven by coding agents

MewUI ships an agent skill for Claude Code, Codex and GitHub Copilot. It gives the agent the facts it would otherwise guess, so what it writes compiles.

Controls you expect, in the box

Buttons, text input, lists, trees, grids, tabs, menus, toolbars, pickers, navigation, and the panels to lay them out. The Gallery sample exercises all of them, and it runs in the browser with no install.

ButtonsButtonToggleButtonRepeatButtonSplitButtonDropDownButton
TextLabelTextBlockTextBoxMultiLineTextBoxPasswordBoxSyntaxViewer
SelectionCheckBoxRadioButtonToggleSwitchComboBoxListBox
DataTreeViewGridView
ValuesSliderProgressBarProgressRingNumericUpDownColorPickerDatePickerCalendar
ContainersTabControlGroupBoxExpanderBorderScrollViewerNavigationView
Menus and barsMenuBarContextMenuToolTipToolBar
MediaImage
AppWindowDispatcherTimer
MoreSegmentedControlButtonGroupMarkupTextBlockItemsControlContentControlUserControlTransitionContentControlPopupSeparatorMessageBoxFileDialog
PanelsGridStackPanelDockPanelUniformGridWrapPanelCanvasSplitPanel
Open the GalleryBrowse the samples

Optional extensions

The core stays thin. Larger features ship as separate packages you reference only when you need them.

MewDock

Visual Studio style docking: document and tool tabs, drag rearranging, splits, auto hide, popouts.

SVG

Pure C# SVG parsing and rendering. No System.Drawing, AOT compatible.

Skia

SkiaCanvasView for drawing with SkiaSharp, with zero copy GPU interop per backend.

MewCharts

Cartesian, pie and polar charts on the LiveChartsCore engine, without a SkiaSharp dependency.

WebView2

Win32 WebView2 control. Requires the Microsoft Edge WebView2 runtime.

Platforms and rendering backends

Windowing runs through a platform host, drawing through a backend. Pick one backend at publish time to trim the rest away.

PlatformHostBackends
Windows 10+Win32Direct2D, GDI, MewVG
LinuxX11MewVG (OpenGL)
macOS 12+AppKitMewVG (Metal)
BrowserWebAssemblyMewVG (WebGL2)

Where the project stands

MewUI is at 0.21.1 and under active development. The public API is still being stabilized, so breaking changes can land between minor releases. Pin your package version and read the release notes before upgrading.

Release notes

Documentation

In English and Korean.