When I work this code in NavigationContext
I am getting an error.
protected void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) {
base.OnNavigatedTo(e);
string parameterValue = NavigationContext.QueryString["parameter"];
}
When I work this code in NavigationContext
I am getting an error.
protected void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) {
base.OnNavigatedTo(e);
string parameterValue = NavigationContext.QueryString["parameter"];
}
In Windows Phone 8.1 RT model app there is no need to pass parameters in URI format. Now you can send them as an object. You can create your own class for this, for example:
When you want to navigate from one page to another you use
Frame.Navigate()
method:When navigation is completed, you can just get object with your parameters from property named
Parameter
. You do this in a page you wanted to navigate.