30Patterns with XAML Apps

WHY MVVM?

Dependency injection, as explained in Chapter 15, “Dependency Injection and Configuration,” provides an easy way to create unit tests and gives you a way to build the major functionality of your application independent of a hosting technology. You've seen this in concrete examples in Chapter 25, “Services,” where the same functionality has been used with ASP.NET Core Web APIs, gRPC, and Azure Functions.

Dependency injection plays an important part with XAML-based applications as well. Windows and mobile applications give you many options to use, and you shouldn't restrict your application development to one of these technologies. With XAML, you have older (WPF, Silverlight, Xamarin.Forms, UWP) and newer (WinUI, MAUI, Platform Uno) technologies. Some older technologies still have great support with .NET 5, such as WPF.

One project to support all Windows 10 platforms ...

Get Professional C# and .NET, 2021st Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.