Created
August 25, 2020 09:25
-
-
Save MartinZikmund/cc79c2ba75246b966b85ade06a6ffd25 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Settings | |
{ | |
private static ApplicationDataContainer _settings = ApplicationData.Current.LocalSettings; | |
public static bool IsFirstRun | |
{ | |
get | |
{ | |
if (_settings.Values.TryGetValue(nameof(IsFirstRun), out var isFirstRun)) | |
{ | |
return (bool)isFirstRun; | |
} | |
return true; | |
} | |
set => _settings.Values[nameof(IsFirstRun)] = value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment