I have a List<accounts> accountslist
that I want to pass to another Page in the Frame, but my app crashes when I navigate to the next Page.
C#: this is on the First
Page,
//above this, there are codes that deserialize the List data from
//phone's storage
List<accounts> accountslist;
Frame.Navigate(typeof(Second), accountslist);
//Second is the second page that I want the accountlist to go to..
this is on the Second
Page:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
List<accounts> accountslist = e.Parameter as List<accounts>;
//when Second frame is about to be displayed,
//the app crashed, :(
}
I have tried this.Loaded
on the Second
Page to deserialize the accountslist
from the phone's storage, but the result is still the same (the app crashed when it is loaded/navigated from the First
Page.)