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 mod


    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 mod

    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.