Getting Started
From a template
The easiest way to start a Majorsilence.Forms application is the dotnet template, published on NuGet.
dotnet new --install MajorsilenceForms.Templates
dotnet new majorsilenceforms
dotnet run
This creates and runs a basic “Hello World” Majorsilence.Forms application.
There isn’t standalone API documentation yet, but the surface should be familiar to anyone with Windows Forms experience. The best reference is the source of the sample applications:
ControlGallery— every built-in control, live.Explorer— a Windows Explorer clone.
See Samples for the full list and how to run each one.
From scratch
To turn a regular .NET console application into a Majorsilence.Forms application, make the following changes.
Project file
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
Add a reference to Majorsilence.Forms and to a backend — the core package references no windowing
toolkit, so the backend is what actually puts a window on screen:
<ItemGroup>
<PackageReference Include="Majorsilence.Forms" Version="26.0.30" />
<PackageReference Include="Majorsilence.Forms.Avalonia" Version="26.0.30" />
</ItemGroup>
An empty form
using Majorsilence.Forms;
public class MainForm : Form
{
}
Program.cs
Call Application.Run() with an instance of your form:
static void Main (string [] args)
{
Application.Run (new MainForm ());
}
Your application is now ready to run — on the default Avalonia backend, that’s Windows, macOS, and Linux with no further configuration. See Platform backends to target Uno Platform, the browser, or offscreen rendering instead.
Where to go next
- Training guide — the structured curriculum for a whole team: the mental model, the compatibility contract, migration, backends, testing, and the CI gates and rollout plan that go with them.
- Platform backends — the host seam, running in the browser, embedding Majorsilence.Forms inside an existing Avalonia or Uno app, and touch gestures.
- Automation & UI testing — write UI tests that run headlessly in CI, drive the app from Selenium or FlaUI, and light up screen readers on Windows.
- Native interop — hosting native content (video, maps,
browser engines) and why
Control.Handleisn’t anHWND.
Migrating an existing WinForms app
Bringing over an existing codebase rather than starting fresh? Two documents cover it:
MIGRATION.md— how themajorsilence-migrateCLI rewrites a WinForms solution onto Majorsilence.Forms, and how to read its output.COMPATIBILITY_MATRIX.md— what’s fully implemented, what’s approximated, and what’s deliberately out of scope, once your code compiles.
Early stage: the API is stabilizing and not every WinForms corner is covered yet. It’s a good fit for new cross-platform LOB apps and for migrating real apps today — just pin your version.