AutoSettingUI.WPF
1.3.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package AutoSettingUI.WPF --version 1.3.0
NuGet\Install-Package AutoSettingUI.WPF -Version 1.3.0
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="AutoSettingUI.WPF" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AutoSettingUI.WPF" Version="1.3.0" />
<PackageReference Include="AutoSettingUI.WPF" />
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 AutoSettingUI.WPF --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AutoSettingUI.WPF, 1.3.0"
#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 AutoSettingUI.WPF@1.3.0
#: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=AutoSettingUI.WPF&version=1.3.0
#tool nuget:?package=AutoSettingUI.WPF&version=1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AutoSettingUI.WPF
WPF implementation for AutoSettingUI - Declarative settings UI controls for Windows Presentation Foundation applications.
Installation
<PackageReference Include="AutoSettingUI.WPF" />
Quick Start
1. Define Your Settings Class
using AutoSettingUI.Core.Attributes;
[SettingUI(Category = "General")]
[MainHeader("Application Settings")]
public class AppSettings
{
[Title("App Name")]
public string Name { get; set; } = "My App";
[Title("Enable Dark Mode")]
public bool DarkMode { get; set; }
[Title("Volume"), Range(0, 100)]
public int Volume { get; set; } = 50;
}
2. Add to Your WPF Window
<Window xmlns:auto="clr-namespace:AutoSettingUI.WPF.Controls;assembly=AutoSettingUI.WPF">
<auto:WpfAutoSettingPanel
Title="Settings"
Targets="{Binding SettingsList}"
ShowNavigation="True"
NavigationWidth="200" />
</Window>
3. AOT Support (Optional)
panel.DescriptorProvider = new AutoSettingUI.Generated.GeneratedSettingProvider();
panel.PropertyAccessor = new AutoSettingUI.Generated.GeneratedSettingProvider();
Extended Controls
| Attribute | Description |
|---|---|
[CheckBox] |
Boolean as CheckBox |
[DatePicker] |
DateTime with date picker |
Dependency Properties
| Property | Type | Default | Description |
|---|---|---|---|
Title |
string? |
null |
Panel-level title |
Targets |
IList? |
null |
Settings objects to render |
DescriptorProvider |
ISettingDescriptorProvider? |
null |
Custom provider for AOT |
ShowNavigation |
bool |
true |
Show sidebar navigation |
NavigationWidth |
double |
200 |
Sidebar width |
Control Selection Logic
The WPF panel automatically selects controls based on property type and attributes:
| Condition | Control |
|---|---|
[Range] on numeric property |
Slider |
bool property |
CheckBox |
enum property |
ComboBox |
| Property name contains "password" or "pwd" | PasswordBox |
| Property named "description", "notes", or "comment" | TextBox (multi-line) |
| Other strings/types | TextBox (single-line) |
[ControlBinding] attribute |
Custom control |
Custom Control Binding
[Title("Volume")]
[ControlBinding(typeof(Slider), BindingProperty = "Value", FactoryMethod = nameof(VolumeFactory))]
public double Volume { get; set; } = 50.0;
public Slider VolumeFactory()
{
return new Slider
{
Minimum = 0,
Maximum = 100,
Width = 200,
TickFrequency = 10,
IsSnapToTickEnabled = true
};
}
Related Packages
- AutoSettingUI.Core - Core attributes and interfaces
- AutoSettingUI.Generator - Roslyn source generator for AOT
- AutoSettingUI.Avalonia - Avalonia UI panel
- AutoSettingUI.Ursa - Ursa-themed Avalonia panel
Documentation
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net9.0-windows7.0 is compatible. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0-windows7.0
- AutoSettingUI.Core (>= 1.3.0)
- AutoSettingUI.Extension.Shared (>= 1.3.0)
-
net8.0-windows7.0
- AutoSettingUI.Core (>= 1.3.0)
- AutoSettingUI.Extension.Shared (>= 1.3.0)
-
net9.0-windows7.0
- AutoSettingUI.Core (>= 1.3.0)
- AutoSettingUI.Extension.Shared (>= 1.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.