Search code examples
c#windows-phone-8.1windows-store-appswin-universal-appupgrade

What happens to ApplicationData.LocalSettings while Upgrading WP 8.1 SilverLight to WP 8.1 Universal


I have a WP 8.1 Silverlight app already in store . Which uses ApplicationData.LocalSettings to save its local settings.

I am planning to migrate this app to Windows 8.1 universal . And then will target to windows 10 .

My question is, what will happen to the values stored in ApplicationData.LocalSettings while upgrading. I guess the values will be available in universal because the same api is available there. Can anyone confirm it ?

Thanks in advance


Solution

  • It is still available for UWP applications:

    var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
    
    1. To save settings:

      localSettings.Values["exampleSetting"] = "Hello Windows";
      
    2. To retrieve settings:

      Object value = localSettings.Values["exampleSetting"];