pkar.UWP.Config
1.0.0
Prefix Reserved
dotnet add package pkar.UWP.Config --version 1.0.0
NuGet\Install-Package pkar.UWP.Config -Version 1.0.0
<PackageReference Include="pkar.UWP.Config" Version="1.0.0" />
paket add pkar.UWP.Config --version 1.0.0
#r "nuget: pkar.UWP.Config, 1.0.0"
// Install pkar.UWP.Config as a Cake Addin #addin nuget:?package=pkar.UWP.Config&version=1.0.0 // Install pkar.UWP.Config as a Cake Tool #tool nuget:?package=pkar.UWP.Config&version=1.0.0
This Nuget fulfills two goals:
- add .Net configuration provider as translator from UWP ApplicationData
- add UI extensions helpers to transfer data between UI elements and .Net configuration.
It uses my Nuget pkar.NetConfigs, and its definition of various config providers. Used config sources:
- INI source;
- Environment variables (which are prefixed with appname);
- UWP ApplicationData.Current roaming and local;
- JSON source, also roaming and local
- command line arguments.
You can init config library using direct pkar.NetConfigs.InitSettings, or via this Nuget:
initialization
Sub InitSettings(sIniContent As String, bIniUseDebug As Boolean,
cmdLineArgs As IList(Of String))
Using string with Ini file content, not filename as parameter solves problem with same library used in Platform Uno (and Xamarin) contexts - Android doesn't unpack install files, so files cannot be accessed in standard way. Command line arguments can be passed from OnActivated.CommandLineActivatedEventArgs (in UWP 16299+).
helpers
For all [Get|Set]Settings*, you can provide setting name (key), or use default (same as UI element name). For GetSettings*, you can provide default value, and for SetSettings*, you can specify if setting should be placed also in roaming (it is always placed in local setting).
TextBlock.[Get|Set]SettingsString()
TextBox.[Get|Set]SettingsString()
TextBox.[Get|Set]SettingsInt() // this Int can be scaled (int is saved, but UI get double)
ToggleSwitch.[Get|Set]SettingsBool
ToggleButton.[Get|Set]SettingsBool
AppBarToggleButton.[Get|Set]SettingsBool
Slider.[Get|Set]SettingsInt()
ComboBox.[Get|Set]SettingsInt() // selected item index
CalendarDatePicker.[Get|Set]SettingsDate
Product | Versions Compatible and additional computed target framework versions. |
---|---|
Universal Windows Platform | uap was computed. uap10.0 is compatible. |
-
UAP 10.0
- pkar.NetConfigs (>= 1.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 195 | 4/20/2023 |
Initial release.