Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Moda Page await

AndersonNoletoAndersonNoleto USMember ✭✭✭

I need to receive a value from modal Page. I win open modal Page but dont win retur one value wuen I pop this. How to do this? Thanks



  • NMackayNMackay GBInsider, University admin


    If you just want to get something working quickly you can use the messagecenter to pass the value back to the calling view model (assuming your using binding and MVVM pattern). Even if your not, you can pass messages between pages with the value you want to return.

    I'm not saying this is the recommended approach, it's just a suggestion to get something working quickly if your starting out with Forms.

  • NMackayNMackay GBInsider, University admin

    As I mentioned, the message center is just a quick way to do this and does have drawbacks you have to be aware of if you have multiple instances of pages open.

    There's a blog post here from @adamkemp which shows a decoupled way of doing this.

  • AndersonNoletoAndersonNoleto USMember ✭✭✭

    Hi @NMackay ,
    Do you have a code example ? Thanks.

Sign In or Register to comment.