Back to results for “Dependency injection”
.NET MAUI › Migration from Xamarin.Forms

What common breaking changes should you expect when migrating to MAUI?

Advanced

Answer

Watch for: removed/renamed layout options (StackLayout defaults, some AbsoluteLayout behavior), FormsApplicationDelegate/Activity base classes becoming Maui* equivalents, DependencyService replaced by DI, App.xaml resource resolution differences, image/font declaration changes, and third-party libraries needing MAUI versions. Test layouts closely since spacing/measure changed.
Real-world example A migrated screen looks slightly off until the team adjusts StackLayout spacing and switches DependencyService calls to injected services.

Common follow-ups: What replaces DependencyService? | Why re-test layouts after migration?