pkar.winui3.Configs 1.1.1

Prefix Reserved
dotnet add package pkar.winui3.Configs --version 1.1.1                
NuGet\Install-Package pkar.winui3.Configs -Version 1.1.1                
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.winui3.Configs" Version="1.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add pkar.winui3.Configs --version 1.1.1                
#r "nuget: pkar.winui3.Configs, 1.1.1"                
#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.
// Install pkar.winui3.Configs as a Cake Addin
#addin nuget:?package=pkar.winui3.Configs&version=1.1.1

// Install pkar.winui3.Configs as a Cake Tool
#tool nuget:?package=pkar.winui3.Configs&version=1.1.1                

This Nuget adds UI extensions helpers to transfer data between UI elements and .Net configuration. It is similar to my other Nugets: pkar.Uwp.Config and pkar.Wpf.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
    ToggleSwitch.[Get|Set]SettingsBool [since 1.1.1]
    AppBarToggleButton.[Get|Set]SettingsBool  [since 1.1.1]
    Slider.[Get|Set]SettingsInt()
    ComboBox.[Get|Set]SettingsInt() // selected item index 
    CalendarDatePicker.[Get|Set]SettingsDate
Product Compatible and additional computed target framework versions.
.NET net6.0-windows10.0.19041 is compatible.  net7.0-windows was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1.1 160 1/21/2024
1.1.0 144 10/6/2023

+AppBarToggleButton, +ToggleSwitch