FmgLib.MauiMarkup
.NET MAUI 9 & 10 · MIT

Build your MAUI UI in pure C#

Every bindable property of every control gets a chainable method with the same name, and every event gets an On<EventName>. Your code reads like the visual tree — with IntelliSense, refactoring and compile-time safety, and no XAML.

dotnet add package FmgLib.MauiMarkup
C# MainPage.cs
public partial class MainPage : ContentPage, IFmgLibHotReload
{
    int count = 0;

    public MainPage() => this.InitializeHotReload();

    public void Build() => this.Content(
        new VerticalStackLayout()
        .Spacing(25).Padding(30).Center()
        .Children(
            new Label()
                .Text("Hello, World!")
                .FontSize(32)
                .CenterHorizontal(),

            new Button()
                .Text("Click me")
                .OnClicked(b => b.Text = $"Clicked {++count} times")
        )
    );
}

Why it feels different

One language, one file, one mental model — the fluent API is generated from the MAUI surface itself, so it never lags behind.

Every control, every property

Fluent methods are generated for the whole MAUI surface and stay in sync with the MAUI version you reference.

Hot reload built in

Implement IFmgLibHotReload, call InitializeHotReload(), and Build() re-runs on every edit — leak-free and crash-isolated.

Third-party controls too

Annotate with [MauiMarkup(typeof(...))] and the source generator produces the same API for Syncfusion, UraniumUI, SkiaSharp, ZXing and friends.

First-class bindings

String paths or compiled Getter expressions, inline converters, typed multi-bindings, fallback and target-null values.

Theming & styling

OnLight/OnDark, OnPlatform, OnIdiom and DynamicResource on any property, plus strongly-typed Style<T>.

Localization

JSON or RESX based, with instant runtime language switching.

What's in the docs

36 pages, published straight from master. Merge a change upstream and it appears here on the next sync.