ColorVision.Themes
1.3.8.2
dotnet add package ColorVision.Themes --version 1.3.8.2
NuGet\Install-Package ColorVision.Themes -Version 1.3.8.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="ColorVision.Themes" Version="1.3.8.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ColorVision.Themes" Version="1.3.8.2" />
<PackageReference Include="ColorVision.Themes" />
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 ColorVision.Themes --version 1.3.8.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ColorVision.Themes, 1.3.8.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 ColorVision.Themes@1.3.8.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=ColorVision.Themes&version=1.3.8.2
#tool nuget:?package=ColorVision.Themes&version=1.3.8.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ColorVision.Themes
🎯 功能定位
主题管理和样式系统,提供ColorVision应用程序的视觉主题和自定义控件样式。
作用范围
UI视觉层,为整个应用程序提供统一的主题风格和自定义控件外观。
主要功能点
主题支持
- 深色主题 - 适合长时间使用的暗色调主题
- 浅色主题 - 明亮清晰的浅色调主题
- 粉色主题 - 柔和的粉色调主题
- 青色主题 - 清新的青色调主题
- 跟随系统 - 自动适配系统主题设置
自定义控件
- 上传控件 - 文件上传界面组件
- 下载控件 - 文件下载进度显示
- 消息弹窗 - 统一样式的消息提示窗口
- 对话框 - 自定义样式的对话框控件
- 按钮样式 - 多种按钮风格和状态
- 输入控件 - 文本框、下拉框等输入控件样式
主题切换
- 运行时切换 - 支持应用运行时动态切换主题
- 配置持久化 - 主题选择自动保存和恢复
- 平滑过渡 - 主题切换时的视觉过渡效果
与主程序的依赖关系
被引用方式:
- ColorVision.UI - 引用主题资源和样式
- ColorVision - 主程序应用主题
- 所有插件和项目 - 继承主题样式
引用的外部依赖:
- WPF基础库
- ColorVision.Common - 配置接口
使用方式
引用方式
<ProjectReference Include="..\ColorVision.Themes\ColorVision.Themes.csproj" />
应用主题
// 设置主题
this.ApplyTheme(ThemeConfig.Instance.Theme);
// 切换主题
ThemeConfig.Instance.Theme = ThemeType.Dark;
this.ApplyTheme(ThemeConfig.Instance.Theme);
在XAML中使用主题资源
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/ColorVision.Themes;component/Themes/Dark.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
</Window>
使用自定义控件
<themes:MessageBox Title="提示"
Message="操作成功完成"
ButtonType="OK"/>
主题配置
ThemeConfig设置
public class ThemeConfig : IConfig
{
public ThemeType Theme { get; set; } = ThemeType.Dark;
public bool FollowSystem { get; set; } = false;
}
支持的主题类型
ThemeType.Dark
- 深色主题ThemeType.Light
- 浅色主题ThemeType.Pink
- 粉色主题ThemeType.Cyan
- 青色主题
开发调试
dotnet build UI/ColorVision.Themes/ColorVision.Themes.csproj
目录说明
Themes/
- 主题资源文件目录Controls/
- 自定义控件实现Converters/
- 值转换器Resources/
- 图像和图标资源
相关文档链接
维护者
ColorVision UI团队
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0-windows 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.
-
net6.0-windows7.0
- HandyControl (>= 3.5.1)
- WPF-UI (>= 4.0.3)
-
net8.0-windows7.0
- HandyControl (>= 3.5.1)
- WPF-UI (>= 4.0.3)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on ColorVision.Themes:
Package | Downloads |
---|---|
ColorVision.UI
Package Description |
|
ColorVision.ImageEditor
Package Description |
|
ColorVision.Scheduler
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.3.8.2 | 154 | 9/30/2025 |
1.3.8.1 | 200 | 9/25/2025 |
1.3.7.1 | 209 | 9/21/2025 |
1.3.6.1 | 151 | 9/5/2025 |
1.3.5.1 | 242 | 8/24/2025 |
1.3.4.1 | 152 | 8/18/2025 |
1.3.2.2 | 203 | 6/3/2025 |
1.3.2.1 | 169 | 6/2/2025 |
1.3.1.1 | 165 | 5/29/2025 |
1.2.4.1 | 167 | 5/26/2025 |
1.2.3.4 | 159 | 5/23/2025 |
1.2.3.3 | 162 | 5/22/2025 |
1.2.3.2 | 169 | 5/19/2025 |
1.2.3.1 | 245 | 5/12/2025 |
1.2.1.1 | 167 | 5/6/2025 |
1.1.12.2 | 180 | 4/9/2025 |
1.1.12.1 | 177 | 4/2/2025 |
1.1.11.5 | 190 | 3/22/2025 |
1.1.11.4 | 171 | 3/20/2025 |
1.1.11.3 | 172 | 3/13/2025 |
1.1.11.1 | 161 | 3/3/2025 |
1.1.10.7 | 148 | 2/21/2025 |
1.1.10.6 | 142 | 2/20/2025 |
1.1.10.5 | 130 | 2/14/2025 |
1.1.10.4 | 125 | 2/12/2025 |
1.1.10.3 | 143 | 2/12/2025 |
1.1.10.2 | 121 | 2/12/2025 |
1.1.10.1 | 128 | 2/11/2025 |
1.1.9.29 | 150 | 2/7/2025 |
1.1.9.28 | 139 | 2/6/2025 |
1.1.9.27 | 128 | 2/6/2025 |
1.1.9.26 | 128 | 2/5/2025 |
1.1.9.25 | 110 | 1/24/2025 |
1.1.9.24 | 118 | 1/22/2025 |
1.1.9.23 | 136 | 1/21/2025 |
1.1.9.22 | 126 | 1/21/2025 |
1.1.9.21 | 134 | 1/21/2025 |
1.1.9.20 | 140 | 1/20/2025 |
1.1.9.19 | 127 | 1/17/2025 |
1.1.9.18 | 96 | 1/15/2025 |
1.1.9.17 | 93 | 1/14/2025 |
1.1.9.16 | 113 | 1/14/2025 |
1.1.9.15 | 119 | 1/13/2025 |
1.1.9.14 | 102 | 1/13/2025 |
1.1.9.13 | 110 | 1/13/2025 |
1.1.9.12 | 112 | 1/13/2025 |
1.1.9.11 | 111 | 1/13/2025 |
1.1.9.10 | 133 | 1/13/2025 |
1.1.9.8 | 128 | 1/13/2025 |
1.1.9.7 | 134 | 1/10/2025 |
1.1.9.6 | 111 | 1/8/2025 |
1.1.9.5 | 124 | 1/8/2025 |
1.1.9.4 | 134 | 1/6/2025 |
1.1.9.3 | 139 | 1/6/2025 |
1.1.9.2 | 126 | 1/6/2025 |
1.1.9.1 | 126 | 1/6/2025 |
1.1.6.3 | 126 | 1/2/2025 |
1.1.6.2 | 135 | 12/25/2024 |
1.1.6.1 | 129 | 12/24/2024 |
1.1.5.6 | 130 | 12/19/2024 |
1.1.5.5 | 131 | 12/9/2024 |
1.1.5.4 | 137 | 12/4/2024 |
1.1.5.3 | 145 | 11/29/2024 |
1.1.5.2 | 136 | 11/28/2024 |
1.1.5.1 | 122 | 11/20/2024 |
1.1.4.38 | 132 | 11/16/2024 |
1.1.4.36 | 132 | 11/7/2024 |
1.1.4.35 | 126 | 11/7/2024 |
1.1.4.34 | 155 | 11/4/2024 |
1.1.4.33 | 144 | 11/4/2024 |
1.1.4.32 | 145 | 11/3/2024 |