마지막으로 나는 내 질문에 대해 적절한 대답을 가지고 있습니다. 내 요구 사항 isoalated 스토리지 양식 Mainpage.xaml에서 값을 가져 와서 SecondPage.xaml의 웹 브라우저 컨트롤에 표시했다. 그리고이 모든 것은 MainPage.xaml에 설정된 ListBox 컨트롤의 이미지를 선택했을 때 유용했습니다.
그래서 코드는 인라인 문서와 함께 시나리오를 작성하는 데 언급했습니다.
**//MainPage.xaml.**
private async void imgBookImage_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
//It is the way to take the id from the listView if you are showing your listView through Wrapper using ObservableCollection.
myWrapper bookName = (myWrapper)this.listCloudBooks.SelectedItem;
IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
string dir = "/MainFolder/SubFolder/" + bookName.Id;
if (isf.DirectoryExists(dir))
{
NavigationService.Navigate(new Uri("/MainPage.xaml?selectedItem=" +bookName.Id, UriKind.Relative));//bookName.Id fetching Id of book and through bookid we will get the id on our destination page and will show the data.
}
else
{
//In this method i am creating folder of bookId and storing into the destination folder in my isolated storage. I am not showing the code of this method because i am answering of this question only.
DownloadBooks(bookName);
}
}
//SecondPage.xaml
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
string selectedBookId = "";//Set this variable globally.
position = 1;
IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
string dir = "/MainFolder/SubFolder/" + selectedBookId;
string concatBookJson = string.Concat(dir, "/pageRecords.json");//Taking pageRecords.json, my this file have records of my *.html pages so it is showing from isolateStorage
if (isf.FileExists(concatBookJson))
{
CurrentBook = GetBookContents(concatBookJson);//Returning the Json Deserialize data from the isolated storage.
txtBookName.Text = CurrentBook.Title;//I have title property you can access all properties of your wrapper class (myWrapper).
}
}
당신은 내 요구 사항은 그래서 난 내 PhoneApplciation_Loaded 이벤트에 보여 달랐다에서 MainPage.xaml에서 값을 가져 오는에 대한 OnNavigated 이벤트를 사용해야합니다.