How do i show a Xamarin.Forms Page , from an Android PageRenderer

Hi , i having an issue with Xamarin.Forms , i've created a PageRenderer for a Forms Page , and now i need to show another Forms Page after some processing on this PageRender, on iOS i have the method CreateViewController() ... In Android i have no idea of what is the similar function ... i've tried SetPage, but this method not exists on PageRenderer ...

Best Answer

Answers

  • adamkempadamkemp USInsider, Developer Group Leader mod

    What are you trying to do with this page?

  • RonalddeSouzaRonalddeSouza BRMember

    I want to show this page , something like StartActivity ...

  • adamkempadamkemp USInsider, Developer Group Leader mod

    Why not just show the page from Xamarin.Forms code instead of from your renderer? That way you could just use PushModalAsync or PushAsync.

  • RonalddeSouzaRonalddeSouza BRMember

    No Adam, at PageRenderer the methods PushModalAsync or PushAsync just do not exists.

  • adamkempadamkemp USInsider, Developer Group Leader mod

    I know that. That's why I'm saying you shouldn't be trying to show a new page from within the renderer. You should instead be notifying the Element of that renderer to do something, and that element is in the PCL and does have access to the navigation APIs.

    A renderer shouldn't be doing navigation at all.

  • RonalddeSouzaRonalddeSouza BRMember

    Do u have an example of that ?

Sign In or Register to comment.