Skip to content

About

Modern, high-performance WinForms-like UI framework for .NET built on SkiaSharp.

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Latest commit

 

History

484 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModernFormsNext

.NET NuGet License: MIT

ModernFormsNext is a code-first C# UI framework for .NET 10. It provides a familiar, desktop-style programming model while owning its control tree, layout, input, styling, and SkiaSharp rendering.

ModernFormsNext ControlGallery on Windows

ControlGallery's DataGridView page on Windows. See the sample gallery and screenshot provenance.

Note

ModernFormsNext is under active development. Windows is the primary and most mature platform; APIs and designer workflows continue to evolve.

What is ModernFormsNext?

ModernFormsNext is inspired by WinForms and Modern.Forms, but it is not a skin over native WinForms controls. Framework controls are lightweight C# objects rendered through the ModernFormsNext pipeline, primarily with SkiaSharp.

It is also not .NET MAUI, WPF, WinUI, Avalonia, Uno, Blazor, Electron, or a XAML framework. ModernFormsNext uses code-first UI and keeps platform-neutral control logic separate from WindowKit backends. The project is developing toward broader platform support, but it should not currently be presented as a finished replacement for WinForms, MAUI, or other established UI frameworks.

Current status

Platform Status Target Notes
Windows Supported net10.0-windows Primary development, runtime, designer, and validation platform.
Android Experimental net10.0-android Source-tree Application/Form host supports one main Form, owned modals, and reusable popups; desktop windowing and service parity remain limited.

The repository does not currently provide supported macOS or Linux application backends.

Android status

Warning

Android support in ModernFormsNext 1.11.1 is Experimental. APIs, project structure, and runtime behavior may still change. It is not yet recommended for production applications.

The Android backend presents shared Forms and their real control trees through backend-owned Activity/Skia views under the bounded window policy below. The repository verifies shared layout and SkiaSharp rendering, logical-pixel density conversion, multi-touch routing, scrolling, basic focus, hardware editing keys, Android IME text input, lifecycle tracking, main-thread dispatching, and manifest-aware permissions.

The expanded Android hardware-key route connects supported letters, digits, function/navigation keys and modifiers to the shared command resolver. This implementation has deterministic and scoped API 34 emulator validation; its evidence is separate from software-keyboard composition and physical-keyboard observations.

The current source tree adds the experimental Android Application/Form host: Application.Run(Form), one main Form and owned modal/popup surfaces. It retains explicit mobile window limitations. Android does not provide complete desktop windowing parity, native dialogs, clipboard, file pickers, drag and drop, or the full platform-service set. See Android platform status for the verified support matrix, requirements, known limitations, and sample commands.

The source tree also provides native view hosting: NativeViewHost coordinates real Windows child HWNDs and Android Views through a shared presentation/session contract, with explicit rectangular clipping and airspace limitations. It is infrastructure for future WebView/Media adapters, independent of the rendering backend.

Highlights

  • Code-first controls and forms with no XAML.
  • Custom SkiaSharp-based rendering, layout, hit testing, input, focus, and styling.
  • WinForms-like controls and APIs, including data binding, dialogs, menus, text controls, lists, layout containers, and custom controls.
  • Native ModernFormsNext Markdown viewing and editing through MarkdownViewer, DocumentViewer, and MarkdownEditor—not an embedded browser.
  • Hierarchical dynamic resources at control, parent, window, and application scope, with live resource references to CLR properties.
  • Validated application themes with semantic/custom tokens, inheritance, strict versioned JSON, atomic runtime switching, and optional transitions through the shared animation scheduler.
  • Platform-neutral WindowKit contracts with a mature Windows backend and an experimental Android backend.
  • A ModernFormsNext-native Form/UserControl designer, .mfdesign documents, deterministic .Designer.cs generation, conservative reverse parsing, and a Visual Studio extension.
  • WinForms-like designed UserControl components that share the Form designer pipeline and remain atomic when composed inside another Form or UserControl.
  • Project and Visual Studio item templates for a clean Windows starter application.
  • Automated framework, designer, resource, Unicode, and Android backend tests plus focused manual samples.

Installation

ModernFormsNext 1.11.1 requires .NET 10. The repository selects SDK 10.0.401 in global.json and allows roll-forward to a later installed .NET 10 feature band.

For an existing Windows application:

dotnet add package ModernFormsNext --version 1.11.1

Install the project template and create an application:

dotnet new install ModernFormsNext.Templates::1.11.1
dotnet new mfn-app -n MyApp
cd MyApp
dotnet run

The package and template commands use the release version and become available after 1.11.1 is published. For source builds or pre-release validation, clone the repository and use project references instead. See installation for package, template, VSIX, and Experimental Instance instructions.

Minimal example

This is the current Windows startup model used by the repository's reference application:

using System.Drawing;
using ModernFormsNext;

internal static class Program
{
    [STAThread]
    private static void Main()
    {
        Application.Run(new MainForm());
    }
}

public sealed class MainForm : Form
{
    public MainForm()
    {
        Text = "Hello ModernFormsNext";
        Size = new Size(800, 600);

        var button = new Button
        {
            Text = "Click me",
            Bounds = new Rectangle(24, 24, 120, 40)
        };

        button.Click += (_, _) => button.Text = "Clicked";
        Controls.Add(button);
    }
}

On Android, call Application.Run(Form) from AndroidWindowActivity.OnStartApplication after backend initialization. It returns while the native main Looper continues. Start from the cross-platform sample when evaluating the Android backend.

Visual Studio Designer

The optional ModernFormsNextDesigner.vsix adds View ModernFormsNext Designer for designable ModernFormsNext forms and UserControls, plus matching item templates. Version 1.11.1 of the VSIX is the matching extension for the 1.11.1 framework release.

A designable form uses three related files:

MainForm.cs             # user-authored form code
MainForm.Designer.cs    # generated initialization code
MainForm.mfdesign       # designer document and source of truth

The designer remains code-first: it edits .mfdesign and generates C# rather than XAML. New generated form code assigns Size, while reverse parsing continues to accept ClientSize from older generated files. Designer coordinates remain logical at 100%, 125%, 150%, 175%, and 200% display scaling; device conversion is applied at the input and SkiaSharp rendering boundaries.

Download the matching VSIX from the GitHub release assets when published, or build it locally from ModernFormsNext.VisualStudioExtension.Vsix. The manifest supports amd64 Community, Professional, and Enterprise Visual Studio installations from version 17.0 onward without changing the existing extension identity. See installation, designer architecture, and UserControls.

Templates

ModernFormsNext.Templates contains the mfn-app .NET project template. It creates a minimal net10.0-windows application with Program.cs, a partial MainForm, generated designer code, and the companion .mfdesign document.

The Visual Studio extension also ships ModernFormsNext Form and ModernFormsNext UserControl item templates for adding another designed type to an existing project. The default application reference is samples/ModernFormsNext.DemoApp; control experiments belong in ControlGallery rather than in the generated starter experience.

Packages

The 1.11.1 release is composed of these intentionally published NuGet packages:

Package Purpose
ModernFormsNext Controls, forms, layout, input, documents, and rendering.
ModernFormsNext.Testing Deterministic headless TestHost for framework applications.
ModernFormsNext.Automation Optional semantic snapshots and actions over the accessibility model.
ModernFormsNext.Automation.Windows Opt-in authenticated Windows live automation bridge.
ModernFormsNext.Templates dotnet new project template.
ModernFormsNext.WindowKit Platform-neutral windowing and service contracts.
ModernFormsNext.WindowKit.Backend Shared backend infrastructure.
ModernFormsNext.WindowKit.Backend.Windows Windows backend implementation.
ModernFormsNext.Designing Neutral design document, metadata, serialization, and validation APIs.
ModernFormsNext.CodeGeneration C# designer generation and conservative reverse parsing.
ModernFormsNext.Designer Reusable Windows designer shell and services.

The next release adds ModernFormsNext.WindowKit.Backend.Android as an Experimental NuGet package with net10.0 and net10.0-android assets. It is not part of the already-published 1.11.1 release. Use the same version as the other ModernFormsNext packages after that release is published; see Android package consumption. APIs, behavior, and platform support may change. Windows remains the primary stable backend.

Documentation

GitHub Releases provide versioned offline documentation, API reference, and selected sample bundles generated from the exact release tag. These assets continue to match that package version even after the documentation on master changes. See the versioned documentation artifact workflow for bundle contents and local validation.

The documentation index groups the complete guides by topic.

Known limitations

ModernFormsNext 1.11.1 is stable on its primary Windows path, while several Designer, Android, cross-platform, compatibility, and manual-validation boundaries remain. The central known-limitations index classifies them by type and severity and links to current issues and detailed subsystem documentation.

Samples

Sample Role
ControlGallery Main Windows visual and interaction gallery for controls, layout, rendering, input, and themes.
ModernFormsNext.DemoApp Minimal reference for the generated Windows application.
ModernFormsNext.DesignerPlayground Standalone host for designer development and manual validation.
ModernFormsNext.CrossPlatform.Sample Shared Windows/Android control-tree vertical slice.
ModernFormsNext.Android.SmokeTest Android lifecycle, manifest, and permission technical host.
Explorer and Outlaw Broader application examples and manual checks.

Run ControlGallery on Windows:

dotnet run --project .\samples\ControlGallery\ControlGallery.csproj

Build the repository

Use the .slnx solution; the repository does not rely on a .sln file.

git clone https://github.com/ProGraMajster/ModernFormsNext.git
cd ModernFormsNext
dotnet restore .\ModernFormsNext.slnx
dotnet build .\ModernFormsNext.slnx --configuration Debug --no-restore /p:EnableWindowsTargeting=true
dotnet test .\ModernFormsNext.slnx --configuration Debug --no-restore

Android builds additionally require the .NET Android workload, Android SDK/JDK, and a device or AVD for deployment. The full setup is documented in Android platform status.

Roadmap and versioning

The framework roadmap separates implemented capabilities from future work. Items such as navigation, localization, advanced visualization, and optional feature packages are roadmap work unless the current code and release notes say otherwise.

ModernFormsNext uses semantic versioning. NuGet packages use X.Y.Z; Git release tags use vX.Y.Z. See RELEASING.md for package, assembly, VSIX, validation, and publication rules, and CHANGELOG.md for user-facing changes.

Contributing and reporting issues

Contributions should preserve the code-first architecture, custom rendering model, platform boundaries, public API documentation, and focused test coverage. Use ModernFormsNext.slnx, keep sample roles distinct, and validate Windows behavior before submitting a change. Android changes must describe their tested capability rather than claim general platform parity.

Report bugs and feature requests in the ModernFormsNext issue tracker. Include a minimal reproduction, target framework, OS/version, display scale or Android density, and relevant logs when possible.

License

ModernFormsNext is distributed under the MIT License. Derived and third-party code is documented in third-party-licenses.md.

About

Modern, high-performance WinForms-like UI framework for .NET built on SkiaSharp.

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages