maui-data-binding

Guide .NET MAUI developers in creating compile-time safe XAML and C# bindings.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill maui-data-binding-1k-off
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-data-binding
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/maui-data-binding
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill maui-data-binding-1k-off

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

.NET MAUI data binding often becomes slow, fragile, or silent-broken when property change notification and compiled binding safety are missing, leading to UI not updating or build-time surprises.

Core Features & Use Cases

  • Compiled bindings with x:DataType: Ensures compile-time safety for XAML bindings and supports trimming/AOT scenarios.
  • Reliable change notification: Guides using INotifyPropertyChanged or CommunityToolkit ObservableObject so the UI stays in sync with your ViewModel.
  • Conversion and binding flexibility: Shows how to implement IValueConverter/IMultiValueConverter, select binding modes, apply relative bindings, and use StringFormat plus Fallback/TargetNull values for resilient UI.

Quick Start

Use the maui-data-binding skill to wire a page’s root BindingContext to a ViewModel via x:DataType and then connect control properties to ViewModel members with the correct binding modes and converters where needed.

Frequently Asked Questions about maui-data-binding

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix .NET MAUI XAML bindings not updating the UI?

To fix .NET MAUI XAML bindings not updating the UI, ensure your ViewModel implements INotifyPropertyChanged or CommunityToolkit ObservableObject so property changes correctly notify the bound controls.

What is the best way to enable compiled bindings in .NET MAUI?

The best way to enable compiled bindings in .NET MAUI is to set x:DataType on your page or data template root, which provides compile-time validation and supports trimming and AOT scenarios.

Why does my .NET MAUI data binding fail in AOT or trimming scenarios?

.NET MAUI data binding fails in AOT or trimming scenarios when reflection-based runtime bindings are used; applying compiled bindings with x:DataType ensures type safety and keeps bindings functional under AOT.

How do I implement value converters for .NET MAUI multibinding?

To implement value converters for .NET MAUI multibinding, create classes implementing IValueConverter or IMultiValueConverter to transform bound ViewModel data into the correct UI property types.

Can I use relative bindings and StringFormat in .NET MAUI XAML?

Yes, you can use relative bindings and StringFormat in .NET MAUI XAML to connect control properties to parent BindingContext elements and format displayed values directly in the UI layer.

How do I enforce XC0022 and XC0025 XAML binding warnings as build errors in MAUI?

To enforce XC0022 and XC0025 XAML binding warnings as build errors in MAUI, configure your project to treat these compiled binding warnings as errors, ensuring incorrect binding paths fail the build.