FmgLib.MauiMarkup
C# Code Markup Library for .NET MAUI: UI Development, Multi Lang (Localization) with Fluent Methods and Hot Reload
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/fmglib--fmglib-mauimarkup)HTML
<a href="/listings/fmglib--fmglib-mauimarkup"><img src="/api/listings/fmglib--fmglib-mauimarkup/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
**New project** (recommended — ships hot-reload tasks, no XAML pages):
dotnet new install FmgLib.MauiMarkup.Template dotnet new fmglib-mauimarkup-app -o MyApp
Optional parameters: `--netMajor 10|9` (default `10`), `--includeContent true|false` (default `false`, adds sample pages).
**Existing MAUI project:**
dotnet add package FmgLib.MauiMarkup
The package targets **.NET 10 (MAUI 10)** and **.NET 9 (MAUI 9)**, so the same version works for both.
No registration call needed — the fluent methods and the source generator come with the package. XAML and FmgLib pages coexist, so you can migrate incrementally.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 118 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- # FmgLib.MauiMarkup
- | NuGet Package | Link | Repo Info |
- |--------------|------|-------|
- | `FmgLib.MauiMarkup` | [](https://www.nuget.org/packages/FmgLib.MauiMarkup/)  | [](https://github.com/FmgLib/FmgLib.MauiMarkup/stargazers) [](https://github.com/FmgLib/FmgLib.MauiMarkup/forks) [](https://github.com/FmgLib/FmgLib.MauiMarkup/commits) |
- | `FmgLib.MauiMarkup.Template` | [](https://www.nuget.org/packages/FmgLib.MauiMarkup.Template/)  | - |
- **FmgLib.MauiMarkup** is a fluent C# markup library for .NET MAUI: build your entire UI in pure C# — no XAML. Every bindable property of every MAUI control gets a chainable extension method with the same name, and every event gets an `On<EventName>` method, so your code reads like the visual tree while keeping full IntelliSense, refactoring and compile-time safety.
- ```csharp
- 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 Image()
- .Source("dotnet_bot.png")
- .HeightRequest(200)
- .CenterHorizontal(),
- new Label()
- .Text("Hello, World!")
- .FontSize(32)
- .CenterHorizontal(),
- new Button()
- .Text("Click me")
- .OnClicked(b => b.Text = $"Clicked {++count} times")
- .CenterHorizontal()
- )
- );
- }
- ```
- ## Quick Start
- **New project** (recommended — ships hot-reload tasks, no XAML pages):
- ```bash
- dotnet new install FmgLib.MauiMarkup.Template
- dotnet new fmglib-mauimarkup-app -o MyApp
- ```
- Optional parameters: `--netMajor 10|9` (default `10`), `--includeContent true|false` (default `false`, adds sample pages).
- **Existing MAUI project:**
- ```bash
- dotnet add package FmgLib.MauiMarkup
- ```
- The package targets **.NET 10 (MAUI 10)** and **.NET 9 (MAUI 9)**, so the same version works for both.
- No registration call needed — the fluent methods and the source generator come with the package. XAML and FmgLib pages coexist, so you can migrate incrementally.
- ## 📚 Documentation
- The complete documentation lives in **[docs/](docs/README.md)** — every feature with detailed explanations and examples. Highlights:
- | Topic | Start here |
- |---|---|
- | Setup, first page, project structure | [Getting Started](docs/getting-started.md) |
- | Translating any XAML to fluent C# | [From XAML to C#](docs/xaml-to-csharp.md) |
- | Property methods, `OnLight/OnDark`, `OnPlatform`, `OnIdiom`, `DynamicResource` | [Fluent Properties](docs/fluent-properties.md) |
- | Bindings, converters, multi-binding, compiled bindings | [Property Bindings](docs/data-binding.md) |
- | Layout helpers, `Grid` builders, attached properties | [Layout Options](docs/layout-options.md) · [Grid](docs/grid.md) · [Attached Properties](docs/attached-properties.md) |
- | Events, gestures, behaviors, triggers, menus, `SwipeView` | [Event Handlers](docs/event-handlers.md) · [Triggers](docs/triggers.md) |
- | `Style<T>`, visual states, gradients, shapes, animations | [Styling](docs/styling.md) · [Visual States](docs/visual-states.md) |
- | Shell apps, windows, collections & templates | [Shell Applications](docs/shell-navigation.md) |
- | **Hot reload** (IDE support matrix, `dotnet watch` dev loop, troubleshooting) | [Hot Reload](docs/hot-reload.md) |
- | JSON / RESX localization with live language switching | [Localization](docs/localization-json.md) |
- | **Third-party controls** (`[MauiMarkup]`, auto-generation, Syncfusion/UraniumUI/…) | [Third-Party Controls](docs/third-party-controls.md) |
- | Full example pages & common pitfalls | [Complete Examples](docs/complete-examples.md) · [Tips & Troubleshooting](docs/tips-and-troubleshooting.md) |
- | **AI Skills** — teach your coding agent this library | [AI Skills](docs/ai-skills.md) · [`skills/`](skills/) |
- > 🇹🇷 Dokümantasyonun Türkçe sürümü: **[docs/tr/](docs/tr/README.md)**
- ## 🤖 AI Skills
- Ten installable skill bundles teach AI coding agents (Claude Code, the Claude apps, the Agent SDK, or anything that reads a `SKILL.md`) how to write correct FmgLib.MauiMarkup — the naming rules they can derive instead of guess, the `Build()` lifecycle, the binding builder, the source generator, and the mistakes that fail silently.
- ```
- Fetch https://fmglibmauimarkup.vodisoft.com/llms.txt and install the FmgLib.MauiMarkup AI skills.
- ```
- Or copy any folder from [`skills/`](skills/) into `~/.claude/skills/` (personal) or `<repo>/.claude/skills/` (shared with your team). Full catalog and manual install: **[AI Skills](docs/ai-skills.md)**.
- ## Key Features
- - **Every control, every property, every event** — fluent methods generated for the whole MAUI surface, always in sync with the referenced MAUI version.
- - **Third-party controls too** — annotate with `[MauiMarkup(typeof(...))]` or set `<MauiMarkupSourceGenerator>true</MauiMarkupSourceGenerator>` and the source generator produces the same fluent API for Syncfusion, UraniumUI, SkiaSharp, ZXing, DevExpress, InputKit…
- - **Hot reload built in** — implement `IFmgLibHotReload`, call `InitializeHotReload()`, and your `Build()` re-runs on every code edit (leak-free, crash-isolated, works with `dotnet watch` and IDE hot reload).
- - **First-class bindings** — string paths or compiled `Getter` expressions, inline converters, typed multi-bindings (`Path`/`Getter` several times + `MultiConvert`), `FallbackValue`/`TargetNullValue`.
- - **Theming** — `OnLight/OnDark`, `OnPlatform`, `OnIdiom`, `DynamicResource` on any property; strongly-typed `Style<T>` with triggers and visual states.
- - **Localization** — JSON or RESX based, with instant runtime language switching.
- ## Samples
- The [`sample/`](sample) folder contains complete applications: a 2048 game, an F1 TV browser, an order app, third-party integration demos and more.
- ## License
- See [LICENSE](src/FmgLib.MauiMarkup/LICENSE).
- ## Third-party notices
- Certain core property-building and styling components were originally based on
- Sharp.UI and have since been developed
- for FmgLib.MauiMarkup. The applicable MIT notice is included in
- [THIRD-PARTY-NOTICES](THIRD-PARTY-NOTICES).
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.