 <p>Instead of checking null try below code</p> <pre><code> Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; if (!localSettings.Values.ContainsKey("waslaunched")) { localSettings.Values.Add("waslaunched", "launched"); } </code></pre> <p>Hope this helps!</p>