Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dotnet/maui-data-binding
Guidance for .NET MAUI XAML and C# data bindings — compiled bindings, INotifyPropertyChanged / ObservableObject, value converters, binding modes, multi-binding, relative bindings, fallbacks, and MVVM best practices. USE FOR: setting up compiled bindings with x:DataType, implementing INotifyPropertyChanged or CommunityToolkit ObservableObject, creating IValueConverter / IMultiValueConverter, choosing binding modes, configuring BindingContext, relative bindings, binding fallbacks, StringFormat, co
Passed 24 of 24 test cases with the skill, and 22 of 24 without it.
and 2 more in the full report
2 fixed22 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
We are updating our .NET MAUI app to enforce strict compiled bindings across the solution to improve runtime performance and prepare for NativeAOT. Could you explain and show the XML modifications needed for our .csproj file to treat uncompiled bindings as build errors, especially when using relative source bindings? Provide the project file snippet along with a short explanation of how to configure it.
| Checked | Without skill | With skill |
|---|---|---|
| Includes MauiEnableXamlCBindingWithSourceCompilation set to true in project file | Missed | Passed |
| Includes XC0022 in WarningsAsErrors | Missed | Passed |
| Includes XC0025 in WarningsAsErrors | Missed | Passed |
The instructions your model reads when the skill loads.
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.
x:DataType compiled bindings to a new or existing pageINotifyPropertyChanged or CommunityToolkit ObservableObjectIValueConverter / IMultiValueConverterBindingMode for a control propertyBindingContext in XAML or code-behindSelf, AncestorType, TemplatedParent)StringFormat, FallbackValue, or TargetNullValueSetBinding and lambdas (.NET 9+)maui-collectionview skillmaui-shell-navigation skillmaui-dependency-injection skillApply these to every binding answer — they are the differences between "it compiles" and "it actually updates the UI".
| Situation | Do this | Not this |
|---|---|---|
Deciding where x:DataType goes | Put it wherever a binding scope starts — the page/view root, and each DataTemplate | Scattering it on arbitrary children that share the parent's BindingContext |
| A binding falls back to reflection (XC0022 / XC0023) | Add the right x:DataType for that binding scope; for XC0023 remove the explicit x:DataType="{x:Null}" | x:DataType="x:Object" to silence it — this disables compile-time checking |
A DataTemplate inherits x:DataType from an outer scope (XC0024) | Give the DataTemplate its own x:DataType | Leaving it to resolve against the wrong type |
test cases passed, vs 22 / 24 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.