PF.UI.Shared 1.1.0

dotnet add package PF.UI.Shared --version 1.1.0
                    
NuGet\Install-Package PF.UI.Shared -Version 1.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="PF.UI.Shared" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PF.UI.Shared" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="PF.UI.Shared" />
                    
Project file
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 PF.UI.Shared --version 1.1.0
                    
#r "nuget: PF.UI.Shared, 1.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 PF.UI.Shared@1.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=PF.UI.Shared&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=PF.UI.Shared&version=1.1.0
                    
Install as a Cake Tool

PF.UI.Shared

PF.UI 组件库依赖链最底层的纯工具库,不依赖 PF.UI.Controls,可独立引用(例如只需要转换器或 帮助类,不需要完整控件库时)。

安装

dotnet add package PF.UI.Shared

目录结构

目录 内容
Tools/Converter/ 30+ IValueConverter 实现
Tools/Extension/ DependencyObjectFrameworkElementUIElementColor、几何图形的扩展方法
Tools/Helper/ AnimationHelperColorHelperDpiHelperVisualHelperWindowHelperResourceHelper
Tools/Hook/ 全局 KeyboardHookMouseHookClipboardHook
Tools/Interop/ InteropMethodsInteropValues、安全句柄封装
Tools/Generator/ 代码生成相关工具
Tools/ValidationRule/ WPF 校验规则
Drawing/ 几何图形展平、路径辅助、贝塞尔曲线工具
Media/ GeometryEffectGeometrySource<T>、Arc 几何
Data/Enum/ 共享枚举(如 SkinType

常用入口

ResourceHelperTools/Helper/ResourceHelper.cs)提供跨程序集资源字典加载,是皮肤/主题/ 字体切换机制的通用基础:

// 按 SkinType 加载配色方案
ResourceHelper.GetSkin(SkinType.Dark);

// 加载任意程序集下指定路径的皮肤资源(带回退)
ResourceHelper.GetSkin(assembly, "Themes", SkinType.Dark);
Product Compatible and additional computed target framework versions.
.NET 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.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PF.UI.Shared:

Package Downloads
PF.UI.Controls

WPF 自定义控件库:Growl、Drawer、Steps 等高颜值控件

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 143 7/31/2026
1.0.1 114 7/31/2026
1.0.0 118 7/14/2026

v1.1.0 — 新增全局语言管理器

[新增]
- LanguageManager:运行时热切换界面语言。控件库文案以 Lang.* 为键、经
 {DynamicResource} 引用;简体中文作为「地板」已烘进 PF.UI.Resources 的
 Themes/Default.xaml,下游不做任何配置时文案照常显示,非破坏性变更。
- Register(language, uri):下游可在自己的程序集里放同键名字典并注册,同一语言
 可注册多份(库自带 + App 自有),按注册顺序合并,后注册者优先。
- Apply(language, syncCulture):切换语言。目标语言未翻译的键自动回落到地板,
 不会出现空白文案。syncCulture 默认 false,置 true 时一并切换 CultureInfo,
 使 Calendar/DatePicker 的年月与星期名跟随(这些文案来自 .NET 而非资源字典),
 并强制刷新已渲染的日期控件。
- GetString(key, fallback):C# 侧取文案,与 XAML 共用同一份字典。

v1.0.0 - 初始版本