Silverlight5: Retrieving query string values at startup

Jan 26, 2012 at 10:44 PM
Edited Jan 26, 2012 at 10:46 PM

I have a silverlight 5 app that is required to be passed a query string param at start up (lets call it "account").  How do you propose accessing that query string param in my main view model at startup?  

I first checked NavigationContext during Initialize but that's empty, and NavigationComplete doesn't fire in this instance since that app was just created.  Do you have a method of accessing these query string params that I'm overlooking, or should I just do it the old fashion way (HtmlPage.Document.QueryString["account"])?

Jan 27, 2012 at 7:32 AM

For now, this is not possible. Please use the old fashion way and create a task if you want this fixed in 3.0. I cannot create a quick fix because there are too many breaking changes for 3.0 (we will get rid of the generic UserControl<ViewModel> so you no longer have to define intermediates).

Jan 27, 2012 at 7:52 AM

No its fine, I was just seeing if there was a more appropriate way built into the framework that may be more test friendly.