question

DallasFraser-5902 avatar image
0 Votes"
DallasFraser-5902 asked YonglunLiu-MSFT commented

Upgrading from Xamarin to .Net Maui - Customizing Webview

Upgrading from Xamarin to .Net Maui - Customizing Webview
I need a webview that has a bridge between front-end and the webview.
This was the original guide I used for such an approach - https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/hybridwebvie...


However, trying this in .net maui I found that FormsWebViewClient is obsolete. It seems handlers are the new approach. https://github.com/dotnet/maui/pull/5322

Is there any simple example or documentation to help walk through such an approach?

dotnet-xamarindotnet-maui
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

May I know if you have got any chance to check my answer? I am glad to help if you have any other questions.

0 Votes 0 ·

1 Answer

YonglunLiu-MSFT avatar image
0 Votes"
YonglunLiu-MSFT answered

Hello,

For Customizing Webview, you could refer to the following documentation and sample.

Documentation: Customize controls with handlers.

Sample: WebViewHandler.Android.cs.

MAUI is still in preview testing, and we will improve documentations as soon as possible.:)

Thanks for your feedback.

Best Regards,

Alec Liu.



If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.