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, code-behind SetBinding with lambdas, and enforcing XC0022/XC0025 warnings. DO NOT USE FOR: CollectionV
npx skills add dotnet/skills --skill maui-data-binding --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# .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:DataType` compiled bindings to a new or existing page - Implementing `INotifyPropertyChanged` or CommunityToolkit `ObservableObject` - Creating or consuming `IValueConverter` / `IMultiValueConverter` - Choosing the correct `BindingMode` for a control property - Setting `BindingContext` in XAML or code-behind - Using relative bindings (`Self`, `AncestorType`, `TemplatedParent`) - Applying `StringFormat`, `FallbackValue`, or `TargetNullValue` - Writing AOT-safe code bindings with `SetBinding` and lambdas (.NET 9+) ## When Not to Use - **CollectionView layouts / templates** — use the `maui-collectionview` skill - **Shell navigation parameters** — use the `maui-shell-navigation` skill - **Service registration / DI** — use the `maui-dependency-injection` skill - **Property-change-triggered animations** — use built-in [.NET MAUI animation APIs](https://learn.microsoft.com/dotnet/maui/user-interface/animation/basic) ## Inputs - A .NET MAUI pro
- When to Use
- When Not to Use
- Inputs
- Rules That Change the Answer
- Compiled Bindings — x:DataType Placement
- Placement rules
- DataTemplate always needs its own x:DataType
- Enforce binding warnings as errors
- Binding Modes
- BindingContext and Property Paths
- INotifyPropertyChanged and ObservableObject
- Manual implementation
- CommunityToolkit.Mvvm (recommended)
- Value Converters — IValueConverter
What does the maui-data-binding skill do?
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, code-behind SetBinding with lambdas, and enforcing XC0022/XC0025 warnings. DO NOT USE FOR: CollectionV
How do I install it?
Run `npx skills add dotnet/skills --skill maui-data-binding --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
