pkar.UWP.Config 1.0.2

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package pkar.UWP.Config --version 1.0.2
                    
NuGet\Install-Package pkar.UWP.Config -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="pkar.UWP.Config" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="pkar.UWP.Config" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="pkar.UWP.Config" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add pkar.UWP.Config --version 1.0.2
                    
#r "nuget: pkar.UWP.Config, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package pkar.UWP.Config@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=pkar.UWP.Config&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=pkar.UWP.Config&version=1.0.2
                    
Install as a Cake Tool

This Nuget fulfills two goals:

  1. add .Net configuration provider as translator from UWP ApplicationData
  2. 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:

  1. INI source;
  2. Environment variables (which are prefixed with appname);
  3. UWP ApplicationData.Current roaming and local;
  4. JSON source, also roaming and local
  5. 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 Compatible and additional computed target framework versions.
Universal Windows Platform netcore50 is compatible.  uap was computed.  uap10.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on pkar.UWP.Config:

Package Downloads
pkar.UWP.SharedControls

SharedControls (UI controls), version for UWP

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.2 172 10/29/2025
2.1.1 326 8/5/2025
1.0.2 316 8/5/2025
1.0.0 393 4/20/2023

Changed namespace from pkar.Uwp to pkar.UI