1 – Using the query string
Navigating page:
page.NavigationService.Navigate(new Uri("/Views/Page.xaml?parameter=test", UriKind.Relative));
Destination page:
string parameter = string.Empty; if (NavigationContext.QueryString.TryGetValue("parameter", out parameter)) { this.label.Text = parameter; }
2 – Using NavigationEventArgs
Navigating page:
page.NavigationService.Navigate(new Uri("/Views/Page.xaml?parameter=test", UriKind.Relative)); // and .. protected override void OnNavigatedFrom(NavigationEventArgs e) { // NavigationEventArgs returns destination page Page destinationPage = e.Content as Page; if (destinationPage != null) { // Change property of destination page destinationPage.PublicProperty = "String or object.."; } }
Destination page:
// Just use the value of "PublicProperty"..
3 – Using Manual navigation
Navigating page:
page.NavigationService.Navigate(new Page("passing a string to the constructor"));
Destination page:
public Page(string value) { // Use the value in the constructor... }
References
https://stackoverflow.com/questions/12444816/how-to-pass-values-parameters-between-xaml-pages