TianWeiToolsPro.Controls
3.1.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Framework 4.7.2
This package targets .NET Framework 4.7.2. The package is compatible with this framework or higher.
dotnet add package TianWeiToolsPro.Controls --version 3.1.0
NuGet\Install-Package TianWeiToolsPro.Controls -Version 3.1.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="TianWeiToolsPro.Controls" Version="3.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TianWeiToolsPro.Controls" Version="3.1.0" />
<PackageReference Include="TianWeiToolsPro.Controls" />
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 TianWeiToolsPro.Controls --version 3.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TianWeiToolsPro.Controls, 3.1.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 TianWeiToolsPro.Controls@3.1.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=TianWeiToolsPro.Controls&version=3.1.0
#tool nuget:?package=TianWeiToolsPro.Controls&version=3.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
TianWeiToolsPro.Controls
TianWeiToolsPro.Controls 是天威日常开发沉淀的 WPF 自定义控件与主题资源库,提供一套常用控件样式、主题资源(颜色/画刷/多语言资源)以及若干扩展控件,便于快速搭建 UI。
目标框架
该项目为多目标框架构建(以 TianWeiToolsPro.Controls.csproj 为准),当前工作区可见包含:
- .NET Framework 4.7.2
- .NET Framework 4.8
- .NET 6 (Windows)
- .NET 8 (Windows)
- .NET 10 (Windows)
主要内容
1) 控件/样式(部分)
以下名称以资源/样式文件为准:
FilletWindow:圆角窗体样式FilletButton:圆角按钮FilletHeaderTextblock/FilletHeaderTextbox/FilletHeaderControl:带标题的圆角输入/展示类控件GroupBox/GroupPanel:风格化容器DockPanelEx:泊靠面板扩展TreeViewItemEx:动态/扩展 TreeViewItem 样式TabItemEx:TabItem 样式IconButton/ToggleIconButton:图标按钮类样式- 进度条/加载相关:如
CylindricalProgressBar(以 Themes 内资源为准)
2) 主题资源
常用资源文件:
Themes/Generic.xaml:控件默认样式入口(WPF 约定)Themes/Controls.xaml:控件样式集合Themes/Brushes.xaml:画刷/颜色资源Themes/Lang_zh_cn.xaml、Themes/Lang_en_us.xaml、Themes/Lang_vt.xaml:多语言资源字典
3) 其他类
BoolConverter:布尔值转换器(如反转 bool,用于绑定简化)EnumToDescriptionConverter:枚举值转描述文本(便于中文显示/绑定)
使用方法
方式一:项目引用
把 TianWeiToolsPro.Controls 加入解决方案,并在 WPF 应用项目中引用。
方式二:引用 DLL
编译后引用输出的 DLL。
在 App.xaml 合并资源(推荐)
在你的 WPF 应用 App.xaml 中合并资源字典(Pack URI):
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/TianWeiToolsPro.Controls;component/Themes/Generic.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
如果应用侧也有自己的
Generic.xaml/ 主题资源,注意 ResourceDictionary 的合并顺序:一般基础色板/画刷在前,控件样式在后,业务覆盖样式放最后。
许可证
如仓库包含 LICENSE,则以其中声明为准。
贡献
欢迎提交 PR 或 Issue。
| 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. net10.0-windows7.0 is compatible. |
| .NET Framework | net472 is compatible. net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.2
- MahApps.Metro (>= 2.4.11)
- TianWeiToolsPro.Common (>= 3.1.0)
-
.NETFramework 4.8
- MahApps.Metro (>= 2.4.11)
- TianWeiToolsPro.Common (>= 3.1.0)
-
net10.0-windows7.0
- MahApps.Metro (>= 2.4.11)
- TianWeiToolsPro.Common (>= 3.1.0)
-
net6.0-windows7.0
- MahApps.Metro (>= 2.4.11)
- TianWeiToolsPro.Common (>= 3.1.0)
-
net8.0-windows7.0
- MahApps.Metro (>= 2.4.11)
- TianWeiToolsPro.Common (>= 3.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TianWeiToolsPro.Controls:
| Package | Downloads |
|---|---|
|
TianWeiToolsPro
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.