maui-data-binding

Bind MAUI UI to ViewModel data with compiled bindings and converters.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-data-binding-snailb1007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-data-binding
Source: https://github.com/snailb1007/snail-codex-skills/tree/main/skills/maui-data-binding
Command: npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-data-binding-snailb1007

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

MAUI data binding simplifies connecting UI elements to ViewModels, reducing boilerplate and enabling robust MVVM patterns across apps.

Core Features & Use Cases

  • Compiled bindings with x:DataType for performance and type-safety.
  • IValueConverter support for data transformation in the UI.
  • Binding modes (OneWay, TwoWay, OneTime, OneWayToSource) and StringFormat usage.
  • MultiBinding and RelativeBindings for complex data compositions and templating.
  • Correct BindingContext setup and MVVM best practices to ensure maintainable UI code.

Quick Start

Open a MAUI XAML page and enable compiled bindings by setting x:DataType on the root element, then bind controls to your ViewModel properties to begin.

Frequently Asked Questions about maui-data-binding

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

FAQPage Schema
How do I set up compiled bindings in .NET MAUI?

Compiled bindings in .NET MAUI require setting x:DataType on the root XAML element to enable type-safe ViewModel property binding. This improves performance by validating binding paths at compile time, reducing runtime errors across Pages and DataTemplates.

What is the best way to transform bound data in a MAUI UI?

Transform bound data in a MAUI UI by implementing IValueConverter classes for custom data transformations. You can also apply StringFormat directly in XAML to format display values without modifying the underlying ViewModel properties.

How do relative bindings work for MAUI DataTemplates?

Relative bindings in MAUI allow a control to bind to properties on a different object than its direct BindingContext, such as a parent element. This is essential for complex data compositions and templating scenarios where nested data relationships exist.

Can I bind multiple properties to a single MAUI control?

MultiBinding allows you to bind multiple ViewModel properties to a single MAUI control by combining values. Use a ValueConverter to define how these multiple input values should be composed into the final target property value.

What MAUI binding modes are available for ViewModel synchronization?

MAUI supports OneWay, TwoWay, OneTime, and OneWayToSource binding modes for ViewModel synchronization. OneTime reads data once for performance, while FallbackValue and TargetNullValue properties define UI behavior when bound data is missing or null.