Can I set parameter using NavigationContext.QueryString? (Windows Phone)
-
26-05-2021 - |
Frage
Can I pass value to Navigation Context like this:
NavigationContext.QueryString["param1"] = "PARAM1";
Is it a good way to set parameter?
Lösung
First of all, why you need to store some parameters in NavigationContext.QueryString
? There are exists another good places for this.
If you want to pass parameters to another page, use this:
NavigationService.Navigate(new Uri("SomePage.xaml?param1=PARAM1"))
if you need to save some values to the state dictionary, you can use PhoneApplicationService.Current.State
(global) or PhoneApplicationPage.State
(page specific)
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow