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")
        )
    );
}
INTERACTIVE

Paste XAML. Get FmgLib.MauiMarkup — instantly.

A real converter, not a toy: it understands attached properties, layout shorthands, bindings, styles and more — and tells you plainly when it can't translate something, instead of guessing.

Try:
XAML
C#
NEW

Your AI agent already knows MAUI. Now it knows this.

Ask any agent for a MAUI page in C# markup and you get plausible code that doesn't compile — invented method names, XAML habits transcribed literally, view models built inside Build(). Ten installable skills state the real rules, so it derives .Text() and .CenterHorizontal() instead of guessing.

Fetch https://fmglibmauimarkup.vodisoft.com/llms.txt and install the FmgLib.MauiMarkup AI skills.

Paste that into Claude Code, the Claude apps, the Agent SDK — anything that reads a SKILL.md. MIT licensed, versioned with the library, or install by hand from the repo.

without skills
new Label()
    .SetText("Hello")
    .SetFontSize(30)
    .HorizontalAlign("Center")
None of these methods exist.
with skills
new Label()
    .Text("Hello")
    .FontSize(30)
    .CenterHorizontal()
Derived from the property names.

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

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