Moda Page await

AndersonNoletoAndersonNoleto USMember ✭✭✭

Hi,
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

Tagged:

Posts

  • NMackayNMackay GBInsider, University mod

    @AndersonNoleto

    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.

    http://blog.adamkemp.com/2015/03/decoupling-views.html

  • AndersonNoletoAndersonNoleto USMember ✭✭✭

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

Sign In or Register to comment.