BANGALORE, INDIA: In last month's article we took a look at how even though there is no real multitasking in Windows Phone 7 to save on battery life, applications get events that allow navigation between screens of the app itself and between apps while saving the data that the user was working on.
This gives the impression that the app was running in the background, waiting for the user to come back to it. This data however is not stored if the application is quit completely or the device restarts.
This is where the storage of 'persistent data' comes in. Since Windows Phone 7 uses Silverlight as the development platform it can use the built in IsolatedStorage method to store data into a 'file'. There are a few things you will need to get this to work.
First off, you need to define the 'structure' of the data you wish to store ? as in what are the 'fields' in it.
For instance, if you're creating an app to calculate the EMI of a loan you will need to store the Loan Amount, Rate of Interest and the Tenure in Years as well as the calculated EMI Amount.
Simply create a class that has all of these fields and add them to the project. Here is such a sample class:
Note that this class has some connection to property changes. This is used for automatic binding (and therefore calculation) when user enters data into any of the properties.
Get most out of your technology infrastructure investments with Dell
About CIOL | Media Kit | Site Map | Contact Us | Help | Write to us | Jobs@CyberMedia | Privacy Policy
Copyright © CyberMedia India Online Ltd. All rights reserved. Usage of content from web site is subject to Terms and Conditions.