Skip to content

Instantly share code, notes, and snippets.

@MartinZikmund
Created August 25, 2020 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinZikmund/cc79c2ba75246b966b85ade06a6ffd25 to your computer and use it in GitHub Desktop.
Save MartinZikmund/cc79c2ba75246b966b85ade06a6ffd25 to your computer and use it in GitHub Desktop.
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