Configuring the resources
Resource management is one of the major differences between .NET MAUI and Xamarin.
Cross-platform development presents unique challenges as each platform has its own method for managing resources. This diversity can pose significant management tasks for development teams. For instance, we must incorporate multiple image sizes to accommodate various resolutions.
In Xamarin, most of the resources are managed separately in platform-specific projects. If we want to add an image, we must add the image files with different sizes to all platform projects separately.
.NET MAUI provides an elegant solution to manage resources effectively. The design goal of one single project for all supported platforms helps to manage resources in one place.
In .NET MAUI, resource files can be tagged into different categories using a build action based on the role they play in the project, as we can see in Table 2.2:
Resource... |