It offers runtime state, software settings, consumer choice, resource contents (like the dictionary definitions in a dictionary app), and various other configurations. App information is distinct from user information, facts that the user creates and handles when working with an app. Individual information includes data or media documents, email or communication transcripts, or database files holding content material developed by an individual. User data might be of use or meaningful to one or more app. Often, this will be information your user would like to change or send as an entity in addition to the software alone, for example a document.
Crucial notice about app facts: The duration of the software information is tied to the lifetime of the app. In the event that application is completely removed, all the application data is shed as a result. Don’t use app facts to keep consumer information or whatever customers might perceive as important and irreplaceable. We recommend that the user’s libraries and Microsoft OneDrive be used to put this suggestions. App data is ideal for keeping app-specific consumer preferences, settings, and preferences.
Types of software facts
There have been two types of software data: options and files.
Utilize configurations to keep individual choice and software state resources. The application data API allows you to conveniently establish and access setup (we’re going to show you a few examples later in this post).
Here are data type you can make use of for app configurations:
- UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, One, Increase
- Char16, String
- DateTime, TimeSpan
- For C#/.NET, need: System.DateTimeOffset, System.TimeSpan
- GUID, Point, Dimensions, Rect
- ApplicationDataCompositeValue: A set of related application configurations that must definitely be serialized and deserialized atomically. Utilize composite settings to effortlessly deal with atomic revisions of interdependent setup. The machine ensures the stability of composite options during concurrent access and roaming. Composite setup include optimized for small quantities of information, and performance is bad if you use all of them for big facts sets.
Use records to keep digital information or even make it possible for your own personal, personalized serialized kinds.
Saving app data within the app facts storage
Whenever a software are setup, the system offers they unique per-user information storage for configurations and data. You don’t have to know in which or how this facts prevails, due to the fact system is accountable for dealing with the real storage space, making certain the data was held separated from other programs along with other consumers. The system in addition conserves the items in these data stores if the individual installs an update your software and eliminates the belongings in these data stores completely and cleanly whenever your software try uninstalled.
Within the application facts store, each software has actually system-defined root sites: one for regional data files, one for wandering documents, and another for temporary data. Their application can add newer records and newer containers to each and every of these underlying web directories.
Local app information
Local app data need used in any facts which should be maintained between software periods and is also not appropriate roaming software information. Facts that is not applicable on some other gadgets must stored right here besides. There is absolutely no general dimensions constraint on regional armenian dating site information put. Utilize the regional application data save for facts that it does not sound right to wander as well as for big facts units.
Access your local app facts shop
Before you can see or compose neighborhood app data, you should recover a nearby application data shop. To retrieve the neighborhood app data store, make use of the ApplicationData.LocalSettings land to have the software’s local settings as an ApplicationDataContainer item. Use the ApplicationData.LocalFolder property to have the files in a StorageFolder object. Utilize the ApplicationData.LocalCacheFolder belongings to obtain the folder in the local application facts keep where you could help save records that are not a part of backup and rebuild.
Build and access an easy local environment
To produce or compose a setting, use the ApplicationDataContainer.Values property to access the setup into the localSettings bin we got in the last step. This instance creates a setting named exampleSetting .
To retrieve the environment, make use of alike ApplicationDataContainer.Values land you always produce the setting. This sample demonstrates ideas on how to access the environment we simply produced.
Build and recover a nearby composite appreciate
To create or write a composite importance, establish an ApplicationDataCompositeValue object. This instance brings a composite style named exampleCompositeSetting and contributes it toward localSettings container.