maui-data-binding
Originally fromdavidortinau/maui-skills
Installation
SKILL.md
.NET MAUI Data Binding
Wire UI controls to ViewModel properties with compile-time safety, correct change notification, and minimal overhead. Prefer compiled bindings everywhere and treat binding warnings as build errors.
When to Use
- Adding
x:DataTypecompiled bindings to a new or existing page - Implementing
INotifyPropertyChangedor CommunityToolkitObservableObject - Creating or consuming
IValueConverter/IMultiValueConverter - Choosing the correct
BindingModefor a control property - Setting
BindingContextin XAML or code-behind - Using relative bindings (
Self,AncestorType,TemplatedParent) - Applying
StringFormat,FallbackValue, orTargetNullValue - Writing AOT-safe code bindings with
SetBindingand lambdas (.NET 9+)