maui-custom-handlers

Define and implement custom .NET MAUI handlers with property and command mappers.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-custom-handlers-snailb1007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-custom-handlers
Source: https://github.com/snailb1007/snail-codex-skills/tree/main/skills/maui-custom-handlers
Command: npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-custom-handlers-snailb1007

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers customize .NET MAUI handlers by adding or modifying how controls are mapped to native platform views, enabling targeted UI tweaks without forking controls.

Core Features & Use Cases

  • Customize existing MAUI controls using AppendToMapping/PrependToMapping/ModifyMapping to adjust visuals or behavior per platform.
  • Create new cross-platform or platform-specific handlers with PropertyMapper and CommandMapper, and register them in MauiProgram.
  • Quick-start scenarios include adding a new platform-aware rendering path for a control or tweaking an existing one in a single app.

Quick Start

Create a cross-platform MAUI control, implement a shared handler with property mappings, and register it in MauiProgram.cs to start customizing your MAUI handlers.

Frequently Asked Questions about maui-custom-handlers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I customize .NET MAUI controls without forking the existing cross-platform components?

Customize .NET MAUI controls by creating handlers with property and command mappers, enabling targeted UI tweaks per platform. You can use AppendToMapping or ModifyMapping to adjust native rendering behavior without altering the original control source.

What is the best way to create platform-specific UI in a cross-platform .NET MAUI app?

Platform-specific UI in .NET MAUI is created using custom handlers with partial class files for each platform. You override CreatePlatformView in each platform file and use conditional platform aliases to implement distinct native rendering paths for a single shared control.

How do I register a custom handler in MauiProgram.cs to apply changes to a specific control?

Register a custom handler in MauiProgram.cs by adding it to the handler collection during app initialization. This ensures the MAUI framework routes the targeted control to your custom handler, applying your mapped property and command modifications across platforms.

Does MAUI custom handler mapping require matching namespaces across platform partial files?

MAUI custom handler mapping requires matching namespaces across all platform partial files to ensure the shared handler compiles correctly. Proper namespace alignment allows the property and command mappers to synchronize bindable properties consistently across native platforms.

When should I use CommandMapper versus PropertyMapper for MAUI handler customization?

Use PropertyMapper to translate bindable property changes into native view updates, and CommandMapper to handle platform-specific command actions. Both are required to ensure the cross-platform control maintains consistent behavior and visuals when mapped to native MAUI handlers.