question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bring DefaultRenderer concept to .NET MAUI

See original GitHub issue

Description

in XF if no renderer could be found for a given control then it would just get assigned DefaultRenderer which was capable of handling Gestures/backgrounds/etc…

Currently in .NET MAUI you’ll just get an exception about no Handler found

Steps to Reproduce

  • Create a control inheriting from VisualElement
  • Use the control in your app

Version with bug

Preview 10 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)

Affected platform versions

All of them

Did you find any workaround?

Register the handler yourself

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
IndianaGarycommented, Jan 7, 2022

I’m running into this now with a control using the latest Skia preview. It prompted me to ask “When does a control require its own Handler?” I had thought that the Skia Handler would be enough but apparently not. I agree, Maui should work out of the box. The current behavior, throwing an Exception, is confusing at best.

1reaction
dotMortencommented, Apr 26, 2022

the less I see a reason to actually have random views “just work”.

Agree here. I think the current exception is a lot easier to troubleshoot than a view rendering wrong. I still think we need a way to make 3rd party controls “just work” without the need for the .UseXXX methods on the builders, since the current alternatives aren’t great.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate a custom renderer to a .NET MAUI handler
NET MAUI ) introduces a new concept called a handler. Handlers offer many performance improvements over custom renderers. In Xamarin.
Read more >
The new handlers infrastructure in .NET MAUI
NET MAUI the concept of renderers becomes obsolete, but bringing your current renderers to .NET MAUI can be done through the compatibility APIs....
Read more >
.NET 6 Desktop Dev Options: WPF, WinForms, UWP, . ...
"In .NET MAUI we are bringing stronger desktop-focused support with ... This is possible because the default renderer for Blazor -- the ...
Read more >
Reuse custom renderers in .NET MAUI
To demonstrate using custom renderers in .NET MAUI, consider a Xamarin.Forms control named PressableView . This control exposes Pressed and ...
Read more >
What will happen to custom controls and Renderers in .net ...
In .NET MAUI the concept of renderers will go away and is replaced by the handler architecture. Renderers were too tightly coupled to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found