Skip to content
Back to search

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.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/fmglib--fmglib-mauimarkup/badge.svg)](/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

i

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)

  1. # FmgLib.MauiMarkup
  2. | NuGet Package | Link | Repo Info |
  3. |--------------|------|-------|
  4. | `FmgLib.MauiMarkup` | [![NuGet](https://img.shields.io/nuget/v/FmgLib.MauiMarkup?includePreReleases=true)](https://www.nuget.org/packages/FmgLib.MauiMarkup/) ![NuGet Downloads](https://img.shields.io/nuget/dt/FmgLib.MauiMarkup.svg) | [![GitHub Stars](https://img.shields.io/github/stars/FmgLib/FmgLib.MauiMarkup?style=flat-square&color=blue)](https://github.com/FmgLib/FmgLib.MauiMarkup/stargazers) [![GitHub Forks](https://img.shields.io/github/forks/FmgLib/FmgLib.MauiMarkup?style=flat-square&color=green)](https://github.com/FmgLib/FmgLib.MauiMarkup/forks) [![GitHub last-commit](https://img.shields.io/github/last-commit/FmgLib/FmgLib.MauiMarkup?style=flat-square)](https://github.com/FmgLib/FmgLib.MauiMarkup/commits) |
  5. | `FmgLib.MauiMarkup.Template` | [![NuGet](https://img.shields.io/nuget/v/FmgLib.MauiMarkup.Template?includePreReleases=true)](https://www.nuget.org/packages/FmgLib.MauiMarkup.Template/) ![NuGet Downloads](https://img.shields.io/nuget/dt/FmgLib.MauiMarkup.Template.svg) | - |
  6. **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.
  7. ```csharp
  8. public partial class MainPage : ContentPage, IFmgLibHotReload
  9. {
  10. int count = 0;
  11. public MainPage() => this.InitializeHotReload();
  12. public void Build() =>
  13. this.Content(
  14. new VerticalStackLayout()
  15. .Spacing(25)
  16. .Padding(30)
  17. .Center()
  18. .Children(
  19. new Image()
  20. .Source("dotnet_bot.png")
  21. .HeightRequest(200)
  22. .CenterHorizontal(),
  23. new Label()
  24. .Text("Hello, World!")
  25. .FontSize(32)
  26. .CenterHorizontal(),
  27. new Button()
  28. .Text("Click me")
  29. .OnClicked(b => b.Text = $"Clicked {++count} times")
  30. .CenterHorizontal()
  31. )
  32. );
  33. }
  34. ```
  35. ## Quick Start
  36. **New project** (recommended — ships hot-reload tasks, no XAML pages):
  37. ```bash
  38. dotnet new install FmgLib.MauiMarkup.Template
  39. dotnet new fmglib-mauimarkup-app -o MyApp
  40. ```
  41. Optional parameters: `--netMajor 10|9` (default `10`), `--includeContent true|false` (default `false`, adds sample pages).
  42. **Existing MAUI project:**
  43. ```bash
  44. dotnet add package FmgLib.MauiMarkup
  45. ```
  46. The package targets **.NET 10 (MAUI 10)** and **.NET 9 (MAUI 9)**, so the same version works for both.
  47. 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.
  48. ## 📚 Documentation
  49. The complete documentation lives in **[docs/](docs/README.md)** — every feature with detailed explanations and examples. Highlights:
  50. | Topic | Start here |
  51. |---|---|
  52. | Setup, first page, project structure | [Getting Started](docs/getting-started.md) |
  53. | Translating any XAML to fluent C# | [From XAML to C#](docs/xaml-to-csharp.md) |
  54. | Property methods, `OnLight/OnDark`, `OnPlatform`, `OnIdiom`, `DynamicResource` | [Fluent Properties](docs/fluent-properties.md) |
  55. | Bindings, converters, multi-binding, compiled bindings | [Property Bindings](docs/data-binding.md) |
  56. | Layout helpers, `Grid` builders, attached properties | [Layout Options](docs/layout-options.md) · [Grid](docs/grid.md) · [Attached Properties](docs/attached-properties.md) |
  57. | Events, gestures, behaviors, triggers, menus, `SwipeView` | [Event Handlers](docs/event-handlers.md) · [Triggers](docs/triggers.md) |
  58. | `Style<T>`, visual states, gradients, shapes, animations | [Styling](docs/styling.md) · [Visual States](docs/visual-states.md) |
  59. | Shell apps, windows, collections & templates | [Shell Applications](docs/shell-navigation.md) |
  60. | **Hot reload** (IDE support matrix, `dotnet watch` dev loop, troubleshooting) | [Hot Reload](docs/hot-reload.md) |
  61. | JSON / RESX localization with live language switching | [Localization](docs/localization-json.md) |
  62. | **Third-party controls** (`[MauiMarkup]`, auto-generation, Syncfusion/UraniumUI/…) | [Third-Party Controls](docs/third-party-controls.md) |
  63. | Full example pages & common pitfalls | [Complete Examples](docs/complete-examples.md) · [Tips & Troubleshooting](docs/tips-and-troubleshooting.md) |
  64. | **AI Skills** — teach your coding agent this library | [AI Skills](docs/ai-skills.md) · [`skills/`](skills/) |
  65. > 🇹🇷 Dokümantasyonun Türkçe sürümü: **[docs/tr/](docs/tr/README.md)**
  66. ## 🤖 AI Skills
  67. 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.
  68. ```
  69. Fetch https://fmglibmauimarkup.vodisoft.com/llms.txt and install the FmgLib.MauiMarkup AI skills.
  70. ```
  71. 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)**.
  72. ## Key Features
  73. - **Every control, every property, every event** — fluent methods generated for the whole MAUI surface, always in sync with the referenced MAUI version.
  74. - **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…
  75. - **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).
  76. - **First-class bindings** — string paths or compiled `Getter` expressions, inline converters, typed multi-bindings (`Path`/`Getter` several times + `MultiConvert`), `FallbackValue`/`TargetNullValue`.
  77. - **Theming** — `OnLight/OnDark`, `OnPlatform`, `OnIdiom`, `DynamicResource` on any property; strongly-typed `Style<T>` with triggers and visual states.
  78. - **Localization** — JSON or RESX based, with instant runtime language switching.
  79. ## Samples
  80. The [`sample/`](sample) folder contains complete applications: a 2048 game, an F1 TV browser, an order app, third-party integration demos and more.
  81. ## License
  82. See [LICENSE](src/FmgLib.MauiMarkup/LICENSE).
  83. ## Third-party notices
  84. Certain core property-building and styling components were originally based on
  85. Sharp.UI and have since been developed
  86. for FmgLib.MauiMarkup. The applicable MIT notice is included in
  87. [THIRD-PARTY-NOTICES](THIRD-PARTY-NOTICES).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.