Advertisement
Intermediate .NET MAUI, Troubleshooting & Common Errors

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

Short 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.

Save .NET MAUI mock interview
Advertisement
AModel 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.
Likely follow-ups
  • Where do you register handlers? | What if one platform lacks an implementation?
Related topics