Settings for Silverlight using IsolatedStorageSettings

added by jmccurdy
1/29/2010 9:41:26 AM


Here is a simple static class, Settings, that offers methods to Read and Write application settings and preferences from Silverlight applications. These settings are similar to the ones that Windows apps would store in the registry or in an INI file, but in this case, are written to Silverlight’s isolated storage. This class wraps Silverlight’s IsolatedStorageSettings class, so remember; since a user has the freedom to purge isolated storage at will, this class is mostly useful for storing application preferences like layout sizes and locations, and other creature comforts for regular users. This class can read or write any data type to settings storage; the IsolatedStorageSettings class will automatically serialize and deserialize the settings for you.