https://github.com/lightbuzz/settings-winrt
Settings utility for WinRT
https://github.com/lightbuzz/settings-winrt
Last synced: about 1 year ago
JSON representation
Settings utility for WinRT
- Host: GitHub
- URL: https://github.com/lightbuzz/settings-winrt
- Owner: LightBuzz
- License: apache-2.0
- Created: 2014-08-22T18:43:32.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-10-01T17:34:40.000Z (over 11 years ago)
- Last Synced: 2025-03-13T03:38:00.136Z (over 1 year ago)
- Language: C#
- Size: 188 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Settings utility for WinRT apps
An easy-to-use mchanism for managing the settings within a Windows Phone or Windows 8 app. Supports local and roaming settings.
## Installation
You can download and build this project or simply install it via NuGet:
PM> Install-Package lightbuzz-settings
## Examples
Import the assembly to your project and include its namespace:
using LightBuzz.Settings;
There is one primary class, named Settings, that contains two static properties, Local and Roaming. You can specify whether you want to save a setting locally or under the user's Microsoft account.
### Add / Update a setting
string name = "Vangos Pterneas";
Settings.Local.Set("name", name); // Save in the local settings
Settings.Roaming.Set("name", name); // Save in the roaming settings
### Retrieve a setting
string name = Settings.Local.Get("name"); // Retrieve from the local settings
string name = Settings.Local.Get("name"); // Retrieve from the roaming settings
### Delete a setting
Settings.Local.Remove("name"); // Delete from the local settings
Settings.Roaming.Remove("name"); // Delete from the roaming settings
Please read [Microsoft's guidelines](http://msdn.microsoft.com/en-us/library/windows/apps/hh465094.aspx) about using roaming data.
## Contributors
* [Vangos Pterneas](http://pterneas.com) from [LightBuzz](http://lightbuzz.com)
## License
You are free to use these libraries in personal and commercial projects by attributing the original creator of the project. [View full License](https://github.com/LightBuzz/Settings-WinRT/blob/master/LICENSE).