Summary

Completed

In this module, you saw how to use resources and styles in your .NET MAUI applications. The goal was to simplify UI updates for the TipCalculator app whenever the corporate brand changed. You used the following features to reorganize the code so updates to the UI would be fast and accurate:

  • Resources: You created symbolic constants for size and color values.
  • Styles: You defined the look of a control by using a group of property values.

Resources and styles enable you to centralize all the definitions that affect the branding of your UI. These features make it easier to achieve consistency across all UI elements. They also let you make updates quickly and without error. As a bonus, the XAML for your pages became easier to read because you could reference the Style property instead of individual property settings.

More specifically, in this module you learned how to:

  • Create and use static resources in a MAUI XAML user interface.
  • Create and use dynamic resources.
  • Create a consistent user interface by using styles.
  • Create and use application-wide resources.

Learn more