-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebView Renderer Migration does not load HTML or URL content on Maui compatibility renderer #18842
Comments
I did a test and set the background color of the native webview to orange in the renderer, and there is an orange block on the screen. It appears as if the webview is rendering, but there is no content for some reason. @rmarinho you did the WebView handler before, was there some ordering issue or something that needed to take place? |
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process. |
@mattleibow @rmarinho, since I started this migration way before the end of the life of Xamarin Forms, I do have time to migrate the Renderer to a Maui Handler. Do y'all suggest I try that instead of sticking to the WebView renderer compatibility? |
I was able to find a work around. Here are the steps. I brought into my project the following nugets:
After that. on the MauiProgram.cs file I added:
And Finally on my The issue is that the Renderers under |
Discussed in #18808
I decided to open this ticket, since, after some discussions with the community, there were big indications that this is a bug with the compatibility of the renderer. This was my conclusion:
Since ViewRenderer inherits directly from VisualElementRenderer, it should be working in Maui
maui/src/Controls/src/Core/Compatibility/Handlers/iOS/ViewRenderer.cs
Originally posted by DanielCauser November 16, 2023
Hello!
I'm currently working on migrating our Xamarin Forms app into .net Maui. That said, I'm migrating the Xamarin Forms renderers and using the Compatibility path to simplify the migration process.
I created this discussion because I'm not sure if it is a bug or I'm missing something on my migration.
Here is the outcome of the migration of the Xamarin Forms into .Net MAUI. As you can see, the renderer in the XF platform loads the HTML content, whereas rendererer in the .NET MAUI compatibility mode does not.
I'm also attaching the zip of the projects I'm using to replicate the issue.
CustomRenderer.zip
The renderer looks like the one bellow. I pick the properties from the shared control and render them on the native webview.
The text was updated successfully, but these errors were encountered: