- add a public propery on App class to retain the data during current lifecycle;
- add a public propery on the target page, and then in the prev page's OnNavigatedFrom event set the value of the property for the next page;
- use the property State from the application's current PhoneApplicationService instance, which is a type of generic dictionary. But the object been stored has to be serializable (the reason is when app goes to deactivated it will serialize the objects to isolated storage);
- isolate storage. BUT obviously it is not wise to frequently access isolate storage during application running. Here is a great article of compairing the performance of using isolate storage http://blogs.claritycon.com/kevinmarshall/2010/11/03/wp7-serialization-comparison/
Tuesday, 7 June 2011
Ways of passing data between WP7 pages
The book Programming Windows Phone 7 (MS Press) introduced 4 ways:
Subscribe to:
Comments (Atom)