Thursday, 22 August 2013

Change URI of main page after app was opened by a custom URI

Change URI of main page after app was opened by a custom URI

I use custom URIs to open my app on Windows Phone 8. When the device
receives a URI with my custom protocol a custom UriMapper extracts the
parameters and returns a URI of the form /MainPage.xaml?param1=test. This
opens the main page which in turn uses the parameters to do something.
The problem: If the app is being opened with a custom URI, the custom URI
stays in the back-stack. If I then open a sub page and navigate back with
the back button the main page gets loaded with the parameters, which
results in the app processing the parameters again. I want to replace the
URI in the back-stack with a parameter-less version once the parameters
have been processed.

No comments:

Post a Comment