İhsan İlicali
İhsan İlicali

Reputation: 123

How to pass query string parameters from one page and get in another in WP 7 using MVVM Light

I am developing application in Windows Phone 7 in MVVM arhticeture. I have never worked with MVVM Light. But today for sending querystring parameters from ViewModel of first Page to another, I have searched google and found that I have to use MVVMLight. But I cant find any tutorial or working sample. I have found one that it navigates from one page to another, but without parameters.

UPDATE How to change this solution that in can get parameters from OrderViewModel? code can be found here

Upvotes: 3

Views: 392

Answers (1)

Toni Petrina
Toni Petrina

Reputation: 7112

You use a concept called messaging. Read more on Geoff's Blog: MVVM Light - Passing Params to Target ViewModel Before Navigating.

Basically, you send a message of some type (represented by a C# class) and the target ViewModel registers itself as the recipient of that message. Once you broadcast the message, the other view model will be called.

Upvotes: 1

Related Questions