pkar.WPF.Configs 2.0.20

Prefix Reserved
dotnet add package pkar.WPF.Configs --version 2.0.20
                    
NuGet\Install-Package pkar.WPF.Configs -Version 2.0.20
                    
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.WPF.Configs" Version="2.0.20" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="pkar.WPF.Configs" Version="2.0.20" />
                    
Directory.Packages.props
<PackageReference Include="pkar.WPF.Configs" />
                    
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.WPF.Configs --version 2.0.20
                    
#r "nuget: pkar.WPF.Configs, 2.0.20"
                    
#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.WPF.Configs@2.0.20
                    
#: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.WPF.Configs&version=2.0.20
                    
Install as a Cake Addin
#tool nuget:?package=pkar.WPF.Configs&version=2.0.20
                    
Install as a Cake Tool

This Nuget adds UI extensions helpers to transfer data between UI elements and .Net configuration. It is similar to my other Nuget: pkar.Uwp.Config

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. JSON source, also roaming and local
  4. 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)

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.

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()
    PasswordBox.[Get|Set]SettingsString() [since 1.1.0]
    TextBox.[Get|Set]SettingsInt()  // this Int can be scaled (int is saved, but UI get double)
    ToggleButton.[Get|Set]SettingsBool
    Slider.[Get|Set]SettingsInt()
    ComboBox.[Get|Set]SettingsInt() // selected item index 
    Calendar.[Get|Set]SettingsDate
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.1 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.WPF.Configs:

Package Downloads
pkar.Wpf.SharedControls

Some controls, common to all my apps

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.20 151 12/21/2025
2.0.2 295 8/5/2025
2.0.1 208 11/30/2024
1.1.0 224 9/12/2023
1.0.0 262 5/7/2023

[TextBox|Slider].[Get|Set]SettingsDouble