A handler mapping connects a .NET MAUI view property or another key to logic that changes the view’s platform-specific handler. Handlers bridge cross-platform controls and native views, so mappings provide finer-grained control when the shared abstraction is not enough. section 11.3.1
Choose a mapper method according to how the customization relates to the defaults:
- Use PrependToMapping for a new mapping that should run before the default mappings without overriding them. section 11.3.2
- Use ModifyMapping to change an existing mapping, supplying its existing dictionary key. section 11.3.2
- Use AppendToMapping for most customizations when the custom logic should run after defaults and take precedence. section 11.3.2
Removing an Entry border
An Entry handler mapping can append a customization under a key such as RemoveBorder. Its Action receives the handler instance and corresponding view, allowing platform-specific appearance changes. Mappings commonly live in MauiProgram startup logic or platform folders. section 11.3.2
Figure 11.11 Cross-platform controls are described by interfaces, and virtual views implement them as controls in the .NET MAUI UI layer. Handlers map the abstractions to platform-specific implementations.
Trace how interfaces and virtual views become platform-specific controls through handlers, the layer where mappings apply. section 11.3.1
