AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Xamarin Forms Migration

skill-davidortinau-maui-skills-xamarin-forms-migration · by davidortinau

>

No reviews yet
0 installs
32 views
0.0% view→install

Install

$ agentstack add skill-davidortinau-maui-skills-xamarin-forms-migration

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-davidortinau-maui-skills-xamarin-forms-migration)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Xamarin Forms Migration? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Xamarin.Forms → .NET MAUI Migration

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.

Migration Workflow

  1. Create new .NET MAUI project (single-project — multi-project causes AOT/build errors)
  2. Copy cross-platform code + platform code into Platforms//
  3. Update namespaces (XAML + C# + Essentials — see references/forms-migration-api.md)
  4. Fix layout behavior changes (see below)
  5. Migrate renderers → handlers (not shimmed renderers)
  6. Migrate effects → behaviors
  7. Remove Microsoft.Maui.Controls.Compatibility package
  8. Update NuGet dependencies
  9. Migrate app data stores
  10. Delete bin//obj//Resource.designer.cs, build, test iteratively
  11. Verify against .NET 10 deprecated API list

> Strategy: Create a new project and copy code into it — don't edit the existing project file in place.

Critical Layout Pitfalls

⚠️ Default Spacing Changed to Zero

MAUI zeroes out spacing that Xamarin.Forms set to 6. Your layouts will break silently:


...
...

    
    

> Field advice: Specify all layout values explicitly — don't rely on platform defaults.

⚠️ *AndExpand Is Obsolete — No Silent Warning


    
    

    
    

> Field advice: Flatten layout trees. Replace nested hierarchies with single Grid layouts.

⚠️ ScrollView in StackLayout Doesn't Scroll

ScrollView inside StackLayout expands to full content height (no scroll). Place ScrollView in a Grid with a constrained row instead.

Other Layout Traps

| 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) |

Renderer → Handler Migration

> ⚠️ 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 → Behaviors

> ⚠️ Effects are now Behaviors — this requires redesign, not just renaming.

For new development, prefer behaviors or handler mapper customizations over effects.

⚠️ Do NOT Use the Compatibility Package

Microsoft.Maui.Controls.Compatibility causes cascading incompatibilities. Remove it and rebuild layouts natively.

Retired Dependencies

  • App Center is retired → Replace with Sentry, Azure Monitor, or similar
  • Visual Studio for Mac is retired → Use VS Code or Rider

Android-Specific Warnings

  • Android migration is significantly harder than iOS — expect more UI bugs
  • OEM-specific rendering differences not reproducible on emulators — test on physical devices
  • Shadow rendering varies across OEMs/API levels — implement in platform-specific handler code
  • Handler-level property changes don't auto-update on theme switch — manually handle theme changes

.NET 10 API Currency Warning

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.

Common Troubleshooting

| 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 |

Quick Checklist

  1. ☐ Created new .NET MAUI project (single-project)
  2. ☐ Copied cross-platform and platform code
  3. ☐ Updated XAML namespace to http://schemas.microsoft.com/dotnet/2021/maui
  4. ☐ Replaced Xamarin.Forms.*Microsoft.Maui.* namespaces
  5. ☐ Replaced Xamarin.Essentials → split MAUI namespaces
  6. ☐ Added explicit Grid ColumnDefinitions/RowDefinitions
  7. ☐ Replaced *AndExpand with Grid layouts
  8. ☐ Added explicit spacing/padding values (MAUI defaults to 0)
  9. ☐ Migrated renderers to handlers (not shimmed renderers)
  10. ☐ Migrated effects to behaviors or MAUI effects
  11. ☐ Removed Microsoft.Maui.Controls.Compatibility package
  12. ☐ Updated NuGet dependencies for .NET compatibility
  13. ☐ Migrated App.Properties, SecureStorage, VersionTracking data
  14. ☐ Deleted bin/, obj/, and Resource.designer.cs
  15. ☐ Tested on physical Android device
  16. ☐ Profiled performance
  17. ☐ Verified no .NET 10 deprecated APIs (run maui-current-apis skill)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.