liveBook · Manning

Implicit style

As explained in .NET MAUI in Action

An implicit style is a .NET MAUI style without an explicit key that applies automatically to matching control instances.

An implicit style is a .NET MAUI style without an explicit key. It targets a control type and automatically applies to matching views within its resource scope. section 10.1.1

Use scope and precedence to predict which property value a control receives:

  • App-level styles apply to matching controls throughout the app. section 10.1.1
  • Page-level styles apply within that page and override app-level styles. section 10.1.1
  • Values set directly on a control override styles, while explicit styles take precedence over implicit styles. section 10.1.1

Applying a shared visual rule

Define a style against a target type in an app or page resource dictionary. Every matching control in scope receives its setters automatically, avoiding repeated property declarations. Choose an explicit style instead when only selected instances should change. section 10.1.1 section 10.4

How .NET MAUI in Action covers it

How deep it goes
Explains target types, resource scope, and precedence, while deferring detailed implementation to the explicit-style example.
Examples
Uses app-level styles, page-level styles, matching controls, and a separately styled count Label to contrast implicit and explicit application.
What it assumes
Assumes familiarity with .NET MAUI controls and properties while defining implicit versus explicit styles through concrete styling scenarios.
What you can do after
Apply shared control styling through resource dictionaries and choose explicit styles when customization must remain limited to selected instances.
How it connects
Connects styles with resource dictionaries, explicit styles, control properties, setters, and app-wide or page-specific styling.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.