.NET MAUI › Troubleshooting & Common Errors

Why do I get a 'handler not found' or blank custom control?

Intermediate

Answer

The custom handler isn't registered, or CreatePlatformView returns nothing for a platform. Register handlers in MauiProgram via ConfigureMauiHandlers(h => h.AddHandler(typeof(MyControl), typeof(MyHandler))), and ensure every target platform has an implementation.
builder.ConfigureMauiHandlers(h =>
    h.AddHandler(typeof(MyControl), typeof(MyControlHandler)));
Real-world example A blank custom control appears until the team registers its handler in MauiProgram for all platforms.

Common follow-ups: Where do you register handlers? | What if one platform lacks an implementation?