我收集了用户输入,gotoWeb.xaml.cs
并将收集到的输入存储在独立存储中。我需要将该存储的变量传递给MainPage.xmal.cs
. 我不知道该怎么做?
我需要这个var Page1
并var Page2
在 MainPage.xaml 中。这该怎么做 ?
代码在gotoWeb.xaml
IsolatedStorageSettings.ApplicationSettings["Page1"] = site;
IsolatedStorageSettings.ApplicationSettings.Save();
IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
//store it in the settings
if (!settings.Contains("qsPage1"))
{
//if setting has not been created, add it
settings.Add("qsPage1", site);
}
else
{
//store a the page in the setting
settings["qsPage1"] = site;
}
var Page1 = IsolatedStorageSettings.ApplicationSettings["qsPage1"];
// and by using same isolated settings method, created one more varible
var Page2 = IsolatedStorageSettings.ApplicationSettings["qsPage2"];