| name | xamarin-maui-renderer-handler-migration |
| description | Companion migration skill for converting Xamarin.Forms custom renderers and effects to .NET MAUI handlers. |
| metadata | {"author":"Syncfusion Inc","version":"1.0.0"} |
Xamarin.Forms Renderer to .NET MAUI Handler Migration Skill
Purpose
Use this companion skill to migrate Xamarin.Forms renderer-based UI customizations to .NET MAUI handler architecture with clear risk tracking and validation.
This skill focuses on:
- Detecting custom renderers, effects, and platform-specific native view customizations.
- Mapping renderer responsibilities to MAUI handler/property/command mappers.
- Scaffolding handler classes and platform partial implementations.
- Producing a manual action backlog for high-risk native mappings.
Recommended skill sequence
Run skills in this order for best outcomes:
- xamarin-maui-framework-migration
- xamarin-maui-syncfusion-migration
- xamarin-maui-platform-specific-migration
- xamarin-maui-renderer-handler-migration (this skill)
Use this skill after baseline and platform migration so renderer conversions happen against stable project and platform wiring.
When to use this skill
Use this skill when one or more of the following are present:
- ExportRenderer attributes or renderer registrations.
- Custom renderer classes extending ViewRenderer, PageRenderer, ShellRenderer, or similar.
- Platform effect implementations for Android, iOS, or Windows/UWP.
- Native control manipulations in OnElementChanged, OnElementPropertyChanged, or lifecycle callbacks.
- Custom drawing, gesture, accessibility, or input handling in native renderer code.
Use this skill after baseline namespace/API migration.
Do not use this skill for
- Pure namespace replacement tasks.
- Dependency-only migration with no custom UI layer.
- Platform capability migration without renderer or effect logic.
Inputs
Required input:
- MAUI target project root.
- Source renderer/effect files from Xamarin.Forms projects or copied modules.
Recommended inputs:
- Control API surface and bindable property definitions.
- Any existing MAUI custom control abstractions.
- Platform-specific rendering behavior notes and screenshots.
Optional behavior flags:
- Dry run (analysis and migration plan only).
- Scaffold only (generate templates without wiring registration).
- Strict mode (fail if any renderer has unresolved critical mapping items).
Outputs
Primary outputs:
- Renderer inventory and classification report.
- Handler mapping plan by control/effect.
- Generated handler scaffolds and platform partial templates.
- Manual action backlog with severity and rationale.
Secondary outputs:
- Suggested DI or registration updates.
- Risk heatmap for renderer complexity and platform divergence.
- Validation test matrix for visual and interaction parity.
Execution workflow
-
Renderer and effect inventory
-
Detect renderer classes, effects, and registration attributes.
-
Extract touched native APIs, lifecycle hooks, and property handlers.
-
Classify migration complexity (low, medium, high, critical).
-
Mapping strategy
-
Map renderer responsibilities to handler property and command mappers.
-
Separate shared control logic from platform native logic.
-
Identify unsupported or risky native APIs requiring manual redesign.
-
Scaffold generation
-
Generate handler base class and platform partial classes.
-
Generate property mapper entries for bindable properties.
-
Generate command mapper entries where imperative actions are required.
-
Preserve comments indicating manual mapping points.
-
Registration and wiring
-
Propose handler registration in MauiProgram.
-
Ensure control type-to-handler type mappings are explicit.
-
Flag startup ordering concerns when handlers depend on native SDK initialization.
-
Validation and reporting
-
Validate build references and handler wiring completeness.
-
Validate that no renderer registrations remain active.
-
Produce migration report with unresolved manual mappings.
-
Produce test matrix for visual parity, input behavior, and accessibility.
Rule examples
Detection rules:
- ExportRenderer and ExportEffect attributes indicate legacy wiring.
- Renderer lifecycle overrides indicate likely manual mapping points.
Mapping rules:
- OnElementPropertyChanged logic maps to property mapper actions.
- Imperative updates map to command mapper actions.
- Native view creation logic maps to handler platform view creation paths.
Safety rules:
- Do not remove renderer code until equivalent handler mapping exists.
- Any unresolved native API call must be tracked as manual action.
- Accessibility behavior parity must be explicitly validated.
Safety and constraints
- Default to additive migration (scaffold first, then replace wiring).
- Any high-risk renderer must include explicit validation scenarios.
- Effects with platform-specific side effects must be reviewed manually.
- Migration is incomplete until renderer wiring is removed and parity checks pass.
References
- Handler mapping checklist: references/handler-mapping-checklist.md
Related skills:
- ../xamarin-maui-framework-migration/SKILL.md
- ../xamarin-maui-platform-specific-migration/SKILL.md
- ../xamarin-maui-syncfusion-migration/SKILL.md
Definition of done
Renderer migration is complete when:
- All renderer and effect artifacts are inventoried and classified.
- Handler mappings are implemented or tracked with explicit manual actions.
- Legacy renderer registrations are removed or disabled.
- Visual, interaction, and accessibility parity checks are documented and executed.
- Final report includes unresolved risks, owners, and next actions.