Categories
.NET .NET 8 .NET 9 .NET MAUI Android Blazor C# Code Desktop Developer General Getting Started Hybrid iOS Learn macOS Mobile Tips Web Windows Xamarin Xamarin.Forms

.NET MAUI – App Theming – Create Stylish Apps

This is the fourth article in the recently started series titled Developer Tips, which offers concise hints to enhance productivity. All the articles in this series can be accessed from here.

Basically, theming refers to managing a consistent look and feel across the app. An app can be themed in a variety of ways (MS Office and Visual Studio offer various themes). For mobile apps, the most significant themes are the Light and Dark modes, both of which are inherently supported by the OS. So, the app should have the capability to adapt to mode changes to the least.

Consulting the previous article on Styles is recommended as a foundation for Theming.

Excerpt from the preceding article:

Styles can be referenced through StaticResource or DynamicResource. The key difference is that the former is applied just once, while the lattter maintains a reference and adjusts to changes in themes.

Categories
.NET .NET 8 .NET 9 .NET MAUI Android Blazor C# Code Desktop Developer Getting Started Hybrid iOS Learn macOS Mobile Tips Web Windows Xamarin Xamarin.Forms

.NET MAUI – Styles

This is the third article in the recently started series titled Developer Tips, which offers concise hints to enhance productivity. All the articles in the series can be accessed from here.

A style is characterized by a collection of interrelated properties that aim to improve resource management within the application. It is defined as a list of Setters. A Setter has a property and a value.

Styles can be incorporated into the Resources property, of type ResourceDictionary, defined at the VisualElement level.