/maui-skills:xamarin-forms-migrationfrom maui-skills
Guides migrating Xamarin.Forms apps to .NET MAUI: project structure, namespace renames, layout changes, renderer-to-handler, effects-to-behaviors, and NuGet compatibility.
Ships in maui-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
For project templates, namespace tables, API deprecation tables, and reference code, see references/forms-migration-api.md.
⚠️ Do not use the .NET Upgrade Assistant. Apply namespace renames, project file updates, and package replacements directly. Build after each batch of changes and use compiler errors to guide the next round of fixes.
Platforms/<platform>/references/forms-migration-api.md)Microsoft.Maui.Controls.Compatibility packagebin//obj//Resource.designer.cs, build, test iterativelyStrategy: Create a new project and copy code into it — don't edit the existing project file in place.
MAUI zeroes out spacing that Xamarin.Forms set to 6. Your layouts will break silently:
<!-- ❌ Looks fine in Xamarin.Forms, cramped in MAUI -->
<Grid>...</Grid>
<StackLayout>...</StackLayout>
<!-- ✅ Add explicit values or restore via implicit styles in App.xaml -->
<Style TargetType="Grid">
<Setter Property="ColumnSpacing" Value="6"/>
<Setter Property="RowSpacing" Value="6"/>
</Style>
Field advice: Specify all layout values explicitly — don't rely on platform defaults.
*AndExpand Is Obsolete — No Silent Warning<!-- ❌ Silently ignored in MAUI — image won't expand -->
<StackLayout>
<Label Text="Hello world!"/>
<Image VerticalOptions="FillAndExpand" Source="dotnetbot.png"/>
</StackLayout>
<!-- ✅ Convert to Grid with star sizing -->
<Grid RowDefinitions="Auto, *">
<Label Text="Hello world!"/>
<Image Grid.Row="1" Source="dotnetbot.png"/>
</Grid>
Field advice: Flatten layout trees. Replace nested hierarchies with single Grid layouts.
ScrollView inside StackLayout expands to full content height (no scroll). Place ScrollView in a Grid with a constrained row instead.
| Issue | Fix |
|---|---|
| Grid columns/rows not declared → layout broken | Always add explicit ColumnDefinitions/RowDefinitions |
Frame measures differently | Migrate to Border with StrokeShape |
BoxView invisible (default 0×0 in MAUI) | Set explicit WidthRequest/HeightRequest |
RelativeLayout | Replace with Grid (compatibility namespace only) |
⚠️ Migrate all renderers to handlers. Do NOT use shimmed renderers — they create parent wrapper views that hurt performance.
Preferred: Customize existing handlers with mapper methods:
// ✅ Extend existing handler — no new class needed
Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("NoBorder", (handler, view) =>
{
#if ANDROID
handler.PlatformView.Background = null;
#elif IOS || MACCATALYST
handler.PlatformView.BorderStyle = UIKit.UITextBorderStyle.None;
#endif
});
For completely new native views, create a full handler (see maui-custom-handlers skill).
⚠️ Effects are now Behaviors — this requires redesign, not just renaming.
For new development, prefer behaviors or handler mapper customizations over effects.
Microsoft.Maui.Controls.Compatibility causes cascading incompatibilities. Remove it and rebuild layouts natively.
Migration is the perfect time to skip deprecated APIs entirely. Don't migrate Xamarin.Forms code to a MAUI API that's already on its way out. See the full deprecated API table in references/forms-migration-api.md and run the maui-current-apis skill.
| Issue | Fix |
|---|---|
Xamarin.* namespace doesn't exist | Update to Microsoft.Maui.* equivalent |
| CollectionView doesn't scroll | Place in Grid (not StackLayout) to constrain size |
| Pop-up under page on iOS | Use DisplayAlert from the ContentPage |
| Missing padding/margin/spacing | Add explicit values or implicit styles |
| Custom renderer broken | Migrate to handler |
| SkiaSharp broken | Update to SkiaSharp.Views.Maui package |
| Can't access App.Properties data | Migrate to Preferences |
http://schemas.microsoft.com/dotnet/2021/mauiXamarin.Forms.* → Microsoft.Maui.* namespacesXamarin.Essentials → split MAUI namespacesColumnDefinitions/RowDefinitions*AndExpand with Grid layoutsMicrosoft.Maui.Controls.Compatibility packagebin/, obj/, and Resource.designer.csWhat SKILL.md sets; muted values are Claude Code's defaults
41 skills in this plugin
/maui-accessibilityGuide for making .NET MAUI apps accessible — screen reader support via SemanticProperties, heading levels, AutomationProperties visibility control, programmatic focus and announcements, and platform-specific gotchas for TalkBack, VoiceOver, and Narrator. USE FOR: "add accessibility", "screen reader support", "SemanticProperties", "AutomationProperties", "TalkBack", "VoiceOver", "Narrator", "accessible MAUI", "heading levels", "semantic description", "announce to screen reader", "accessibility audit". DO NOT USE FOR: general UI layout (use maui-collectionview or maui-shell-navigation), animations (use maui-animations), or gestures (use maui-gestures).
/maui-animations.NET MAUI view animations, custom animations, easing functions, rotation, scale, translation, and fade effects. USE FOR: "animate view", "fade in", "fade out", "slide animation", "scale animation", "rotate view", "translate view", "easing function", "custom animation", "animation chaining", "ViewExtensions animation". DO NOT USE FOR: gesture recognition (use maui-gestures), custom drawing (use maui-graphics-drawing), or static layout changes (use maui-data-binding).
/maui-app-icons-splash.NET MAUI app icon configuration, splash screen setup, SVG to PNG conversion at build time, composed/adaptive icons, and platform-specific icon and splash screen requirements for Android, iOS, Mac Catalyst, and Windows. USE FOR: "app icon", "splash screen", "MauiIcon", "MauiSplashScreen", "adaptive icon", "change app icon", "launch screen", "SVG icon", "foreground tint", "icon resize". DO NOT USE FOR: in-app images or image loading (use maui-performance), theming or colors (use maui-theming), or custom drawing (use maui-graphics-drawing).
/maui-app-lifecycle.NET MAUI app lifecycle guidance covering the four app states (not running, running, deactivated, stopped), cross-platform Window lifecycle events, backgrounding and resume behaviour, platform-specific lifecycle mapping for Android and iOS/Mac Catalyst, and state-preservation patterns. USE FOR: "app lifecycle", "OnStart", "OnSleep", "OnResume", "backgrounding", "app state", "window lifecycle", "save state on background", "resume app", "deactivated event", "lifecycle events". DO NOT USE FOR: navigation events (use maui-shell-navigation), dependency injection setup (use maui-dependency-injection), or platform APIs (use maui-platform-invoke).
/maui-aspireGuide for .NET MAUI apps consuming .NET Aspire-hosted backend services. Covers AppHost configuration, service discovery for mobile clients, HttpClient DI setup, Entra ID authentication with MSAL.NET for calling protected APIs, development workflow (Aspire dashboard + MAUI debugging), Blazor Hybrid considerations, and platform-specific networking for Android emulators and iOS simulators. USE FOR: "MAUI with Aspire", "Aspire service discovery", "AppHost MAUI", "Aspire backend", "MAUI Aspire networking", "mobile Aspire", "Aspire dashboard MAUI". DO NOT USE FOR: standalone REST API calls without Aspire (use maui-rest-api), authentication without Aspire (use maui-authentication), or Aspire-only projects without MAUI.
/maui-authenticationAdd authentication to .NET MAUI apps. Covers WebAuthenticator for generic OAuth 2.0 / social login, and MSAL.NET for Microsoft Entra ID (Azure AD) with broker support (Microsoft Authenticator), token caching, Conditional Access, platform-specific setup (Android, iOS, Windows), DelegatingHandler for bearer token API calls, and Blazor Hybrid integration. USE FOR: "add authentication", "OAuth login", "MSAL.NET", "social login", "WebAuthenticator", "Entra ID MAUI", "Azure AD login", "Google login MAUI", "Apple login MAUI", "token caching", "bearer token", "sign in". DO NOT USE FOR: secure local storage of tokens (use maui-secure-storage), Aspire-specific auth setup (use maui-aspire), or server-side Entra ID provisioning (use entra-id-aspire-provisioning).
npx claudepluginhub davidortinau/maui-skills --plugin maui-skillsOther plugins' skills for the same job