Migrating PageRenderer from Xamarin to MAUI crashes the app

Srilekha Chowdary 60 Reputation points
2024-06-12T06:51:33.4866667+00:00

Hi,

I am migrating an app from Xamarin Forms to MAUI. I am currently facing an issue using PageRenderer in MAUI as it is crashing the application. I plan to migrate it to PageHandler in the future and want the code to work in MAUI without many modifications. Could you provide an example of using a PageRenderer in the Android platform in MAUI?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,142 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,126 Reputation points Microsoft External Staff
    2024-06-13T03:12:45.14+00:00

    Hello,

    Thanks for your feedabck.

    After testing PageRenderer, the application does crash when following the official documentation.

    After breakpoint debugging, the crash of this issue occurs when the custom Renderer calls the constructor. Therefore, it is recommended that you report this issue to the official repository to make the development team aware of it.

    In addition, since Renderer has been deprecated in MAUI, it is recommended that you refer to this document for migration. This does not involve a lot of code changes.

    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.