Write data to a setting

Use the ApplicationDataContainer.Values property to access the settings in the roamingSettings container we got in the previous section. This example creates a setting named exampleSetting and a setting named HighPriority that is best suited to transition time-critical info, such as app state.

Note The HighPriority setting has no effect in Windows Phone Store apps.

An ApplicationDataCompositeValue object contains settings that must be accessed atomically. This example creates a composite setting named exampleCompositeSetting and adds it to the roamingSettings container.

Roam data across different types of devices

If you publish two versions of your app - a version for Windows Store and a version for Windows Phone Store - you can roam app data across the apps running on the two different types of devices. To roam data across different versions of your app on different types of devices, assign the same Package Family Name (PFN) to each version of the app.

Remarks

Each app has a quota for roaming app data. Check the ApplicationData.RoamingStorageQuota property to determine the total size of roaming data allowed. If your roaming data exceeds the quota, it won’t roam until its size is less than the quota again.