AutoSettingUI.Ursa
1.2.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.Ursa --version 1.2.0
NuGet\Install-Package AutoSettingUI.Ursa -Version 1.2.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.Ursa" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AutoSettingUI.Ursa" Version="1.2.0" />
<PackageReference Include="AutoSettingUI.Ursa" />
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.Ursa --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AutoSettingUI.Ursa, 1.2.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.Ursa@1.2.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.Ursa&version=1.2.0
#tool nuget:?package=AutoSettingUI.Ursa&version=1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AutoSettingUI.Ursa
Ursa-themed Avalonia UI implementation for AutoSettingUI - Declarative settings UI controls with beautiful Ursa styling.
Installation
<PackageReference Include="AutoSettingUI.Ursa" />
Quick Start
1. Add Style References (Required)
⚠️ Important: You must add the theme style reference to your
App.axamlfile. Without this, the controls will not render correctly.
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u-semi="https://irihi.tech/ursa/themes/semi"
x:Class="YourApp.App">
<Application.Styles>
<u-semi:SemiTheme Locale="zh-CN" />
<StyleInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml"/>
<StyleInclude Source="avares://AutoSettingUI.Ursa/Themes/Generic.axaml"/>
</Application.Styles>
</Application>
2. 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;
}
3. Add to Your Avalonia Window
<Window xmlns:ursa="clr-namespace:AutoSettingUI.Ursa.Controls;assembly=AutoSettingUI.Ursa">
<ursa:UrsaAutoSettingPanel
Title="Settings"
Targets="{Binding SettingsList}"
UseCardBorderTheme="True" />
</Window>
4. AOT Support (Optional)
panel.DescriptorProvider = new AutoSettingUI.Generated.GeneratedSettingProvider();
panel.PropertyAccessor = new AutoSettingUI.Generated.GeneratedSettingProvider();
Extended Controls
ColorPicker
Important: Add the ColorPicker styles to your
App.axaml:
<Application.Styles>
<u-semi:SemiTheme Locale="zh-CN" />
<StyleInclude Source="avares://Avalonia.Controls.ColorPicker/Themes/Fluent/Fluent.xaml"/>
</Application.Styles>
Usage:
using Avalonia.Media;
using AutoSettingUI.Ursa.Attributes;
[SettingUI]
public class ThemeSettings
{
[Title("Accent Color")]
[ColorPicker]
public Color AccentColor { get; set; } = Colors.DodgerBlue;
}
Ursa-Specific Controls
| Attribute | Description |
|---|---|
[TagInput] |
String collection as tags |
[IPv4Box] |
IP address input |
[CheckBox] |
Boolean as CheckBox |
[DatePicker] |
DateTime with date picker |
[TimePicker] |
TimeSpan with time picker |
[NumericUpDown] |
Numeric input with up/down |
[ColorPicker] |
Color selection |
Styled Properties
| Property | Type | Default | Description |
|---|---|---|---|
Title |
string? |
null |
Panel-level title |
Targets |
IEnumerable? |
null |
Settings objects to render |
DescriptorProvider |
ISettingDescriptorProvider? |
null |
Custom provider for AOT |
PropertyAccessor |
IPropertyValueAccessor? |
null |
Custom accessor for AOT |
ShowNavigation |
bool |
true |
Show sidebar navigation |
NavigationWidth |
double |
200 |
Sidebar width |
UseCardBorderTheme |
bool |
true |
Use Ursa card borders |
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,
MaxWidth = 200,
TickFrequency = 10
};
}
Related Packages
- AutoSettingUI.Core - Core attributes and interfaces
- AutoSettingUI.Generator - Roslyn source generator for AOT
- AutoSettingUI.Avalonia - Plain Avalonia panel
- AutoSettingUI.WPF - WPF panel
Documentation
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- AutoSettingUI.Core (>= 1.2.0)
- AutoSettingUI.Extension.Shared (>= 1.2.0)
- Avalonia (>= 11.1.1)
- Avalonia.Controls.ColorPicker (>= 11.1.1)
- Irihi.Ursa (>= 1.13.0)
-
net8.0
- AutoSettingUI.Core (>= 1.2.0)
- AutoSettingUI.Extension.Shared (>= 1.2.0)
- Avalonia (>= 11.1.1)
- Avalonia.Controls.ColorPicker (>= 11.1.1)
- Irihi.Ursa (>= 1.13.0)
-
net9.0
- AutoSettingUI.Core (>= 1.2.0)
- AutoSettingUI.Extension.Shared (>= 1.2.0)
- Avalonia (>= 11.1.1)
- Avalonia.Controls.ColorPicker (>= 11.1.1)
- Irihi.Ursa (>= 1.13.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.