Behind every good application, you'll find data. Without data, an application can't do much. Every application on some level needs to present, manipulate, retrieve, and store application-specific data. As you probably know, data can come from a wide variety of sources, ranging from local file systems and databases to third-party web services. When developing for the Windows Phone 7 platform, you have a built-in ability to access both local storage and web services for retrieval of data. In this chapter, you'll see how to use the local storage system called Isolated Storage.

How Windows Phone 7 Data Storage Works

All Windows Phone 7 devices are required to support data storage using the Isolated Storage file system mechanism. Because all Windows Phone 7 devices also are required to have on-board memory, you can be assured that the Isolated Storage system will be available for your application regardless of what physical hardware the user is working with.

Isolated Storage works by giving each application a physical data store to work with that is accessible only by that particular application. No application will be allowed access to either the underlying file system of the phone or any another application's Isolated Storage space As shown in Figure 5-1, Isolated Storage offers two different use cases for storing and retrieving data.

FIGURE 5-1: Isolated storage options.

One method depicted in Figure 5-1 involves using an application-specific settings collection ...

Get Beginning Windows® Phone 7 Application Development: Building Windows® Phone Applications Using Silverlight® and XNA® now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.