Hawkynt.NativeForms 1.0.0.245

dotnet add package Hawkynt.NativeForms --version 1.0.0.245
                    
NuGet\Install-Package Hawkynt.NativeForms -Version 1.0.0.245
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hawkynt.NativeForms" Version="1.0.0.245" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hawkynt.NativeForms" Version="1.0.0.245" />
                    
Directory.Packages.props
<PackageReference Include="Hawkynt.NativeForms" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hawkynt.NativeForms --version 1.0.0.245
                    
#r "nuget: Hawkynt.NativeForms, 1.0.0.245"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Hawkynt.NativeForms@1.0.0.245
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hawkynt.NativeForms&version=1.0.0.245
                    
Install as a Cake Addin
#tool nuget:?package=Hawkynt.NativeForms&version=1.0.0.245
                    
Install as a Cake Tool

Hawkynt.NativeForms

NuGet NuGet downloads License CI

A trim- and AOT-compatible UI toolkit with a Windows Forms-shaped API, rendering through real platform widgets where it counts and owner-drawing everything else in the host platform's visual style.

๐Ÿ“ฆ Installation

dotnet add package Hawkynt.NativeForms

This is the platform-agnostic core: the controls, layout, binding and theming, plus the backend abstraction. It renders nothing on its own โ€” add at least one backend and register it before creating a window.

โœจ Features

  • A System.Windows.Forms-shaped API: Form, Button, Label, a Controls collection, Click events โ€” without depending on System.Windows.Forms.
  • Real native widgets for the window and the text-bearing primitives; every other control is owner-drawn in the host platform's own visual style.
  • Reflection-free by construction, so the whole surface survives trimming and NativeAOT. The [GridEditable] source generator ships with this package as a compile-time analyzer; nothing to reference at runtime.
  • MVVM, MVC and MVP are first-class: ObservableObject, RelayCommand/RelayCommand<T> and a reflection-free two-way PropertyBinding<T> in Hawkynt.NativeForms.ComponentModel.
  • A backend a consumer references but never registers is dropped again by the trimmer.

๐Ÿงฉ Support matrix

Control families implemented and tested on Windows and Linux. Each family's controls are documented one page per control in the repository docs.

Family Coverage Notes
Windows & dialogs โœ… Modal, border styles, window state, icon, topmost, opacity; message/file/folder/colour/font dialogs
Buttons & toggles โœ… Includes ColorPicker, SplitButton, ToggleSwitch, GridPicker
Containers & layout โœ… Dock/flow/table panels, TabControl, Ribbon, SplitContainer, ZoomPanel
Lists & trees โœ… ListView (5 views, groups, virtual mode), TreeListView, TreeView
Data grid โœ… Virtualized; 15 column kinds, editing, sorting, frozen columns, reorder, merged rows
Scheduling โœ… Outlook-style Day/Work Week/Week/Month, virtualized, overlap packing
Text & input โœ… Masked, numeric, rich, search and token/chip inputs
Editors & inspectors โœ… CodeTextBox (gutter, tokenizer, completion), attribute-driven PropertyGrid
Menus, toolbars, status โœ… Plus Breadcrumb, NotifyIcon, ToolTip
Focus model ยท DPI and dark-mode live switching ยท accessibility โš ๏ธ Tracked box-by-box in docs/PRD.md

๐Ÿš€ Quick start

using Hawkynt.NativeForms;
using Hawkynt.NativeForms.Backends;
using Hawkynt.NativeForms.Backends.Windows;

BackendRegistry.Register(new Win32Backend());

var form = new Form { Text = "Hello", Bounds = new(0, 0, 320, 160) };
var button = new Button { Text = "Click me", Bounds = new(20, 20, 140, 36) };
button.Click += (_, _) => button.Text = "Clicked!";
form.Controls.Add(button);

Application.Run(form);

๐Ÿ“š API reference

Every public and protected member of all 311 types, generated from the built assembly and its XML documentation, is in REFERENCE.md.

๐Ÿ”Œ Dependencies

This package renders nothing by itself. Reference the backends for the platforms you ship on:

Package Platform
Hawkynt.NativeForms.Backends.Windows Windows, via USER32
Hawkynt.NativeForms.Backends.Gtk Linux, via GTK 3
Hawkynt.NativeForms.Backends.MacOS macOS โ€” published for completeness; see Limitations

โš ๏ธ Limitations

  • Nothing renders until a backend is registered. Referencing a backend package is not enough.
  • The macOS backend is published but not implemented: every entry point throws.
  • The focus model, live DPI and dark-mode switching, accessibility and native-peer promotion are incomplete. docs/PRD.md is the authoritative per-box checklist.
  • Controls are implemented and tested on Windows and Linux. Other platforms are untested.

โค๏ธ Support

If this project saves you time or money, consider supporting its development:

GitHub Sponsors PayPal

๐Ÿ“œ License

Licensed under LGPL-3.0-or-later โ€” see the repository LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Hawkynt.NativeForms:

Package Downloads
Hawkynt.NativeForms.Backends.Windows

The Windows (Win32) backend for NativeForms. A thin, reflection-free, source-generated P/Invoke layer that renders NativeForms controls through native USER32 window classes (top-level windows, BUTTON, STATIC). Trim- and NativeAOT-compatible: it compiles on any OS but only runs on Windows.

Hawkynt.NativeForms.Backends.Gtk

The Linux (GTK 3) backend for NativeForms. A thin, reflection-free P/Invoke layer that realizes NativeForms controls as native GTK widgets through libgtk-3, staying fully trim- and NativeAOT-compatible.

Hawkynt.NativeForms.Backends.MacOS

The macOS Cocoa backend for NativeForms. Implements native AppKit windows, controls, menus and common dialogs with CI smoke and screenshot coverage; see docs/backends.md for the remaining platform-specific limitations.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.245 90 9/30/2026
1.0.0.227 3,006 8/2/2026
1.0.0.225 116 8/2/2026
1.0.0.224 242 8/2/2026
1.0.0.223 162 8/2/2026
1.0.0.222 111 8/2/2026
1.0.0.221 148 8/1/2026
1.0.0.220 294 8/1/2026
1.0.0.219 2,513 7/31/2026
1.0.0.218 160 7/31/2026
1.0.0.211 289 7/30/2026