There are 3 xaml pages, 2 of which call the third page with different parameters. How do I write onNavigatedTo() in the third page?
Am using NavigationService.Navigate(new Uri("/third.xaml?paramter=xxxx", UriKind.Relative));
There are 3 xaml pages, 2 of which call the third page with different parameters. How do I write onNavigatedTo() in the third page?
Am using NavigationService.Navigate(new Uri("/third.xaml?paramter=xxxx", UriKind.Relative));
Borrowed and adapted this code from http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff626521(v=vs.105).aspx.
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
string msg = "";
if (NavigationContext.QueryString.TryGetValue("parameter", out msg))
// now your parameter is in the msg variable, and you could do stuff here.
}