MinimalisticWPF 4.8.2

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

MinimalisticWPF 🎨

中文 | English

<a name="中文"></a>

中文版

简介 📖

为WPF项目提供极简化的开发体验,以C#实现过渡、悬停、主题、MonoBehaviour等功能。在一些场景中,它的可读性优于使用XAML。

GitHub
NuGet


核心功能导航 🚀

  1. 过渡 - 属性动画与复合过渡
  2. V增强 - 源码生成器驱动的View
  3. VM增强 - 源码生成器驱动的ViewModel

完整文档 📚

查看Wiki获取完整API参考


版本 📦

版本 类型 目标框架
4.x Limited Support Release .NET 5 / .NET Framework 4.6.2

更新日志 📜

版本 亮点 更新时间
v4.5.3 系统主题跟随 2025-03-27
v4.7.0 提供View支持,不再局限于ViewModel 2025-04-05
v4.7.2 渐变画刷过渡支持 & Click功能块生成 2025-04-13
v4.7.5 优化画刷过渡 & 新增BrushBuilder & 优化Theme特性中的Brush表达式支持 2025-04-14
v4.8.0 优化初始值设定逻辑 & 新增类似于Unity3D的MonoBehaviour 2025-04-19

快速开始 🚀

1. 安装NuGet包
dotnet add package MinimalisticWPF --version 4.8.0
2. 基础过渡动画
// 为控件添加背景色渐变动画
var grid = new Grid();
grid.Transition()
    .SetProperty(x => x.Background, Brushes.Red)
    .SetParams(p => p.Duration = 2)
    .Start();
3. MVVM数据绑定
// 自动生成属性与构造函数
[Observable]
private string _text = "Hello";

<a name="过渡系统"></a>

过渡系统 ⏳

核心特性

  • 链式配置 - 流畅的API设计
  • 复合动画 - 多属性并行/串行动画
  • 性能可控 - 帧率/优先级/线程模式可调

代码示例

// 创建复用动画模板
var template = Transition.Create<Grid>()
    .SetProperty(x => x.Width, 100)
    .SetProperty(x => x.Opacity, 0.5);

// 应用动画到多个控件
grid1.BeginTransition(template);
grid2.BeginTransition(template);

<a name="v增强"></a>

View增强 🧩

特性亮点

  • 源码生成器 - 自动生成依赖属性/构造函数
  • 主题切换 - 标记特性以实现Light/Dark等主题
  • 悬停交互 - 内置鼠标悬停动画支持

示例:主题切换

alternate text is missing from this package README image

<a name="vm增强"></a>

ViewModel增强 🧩

特性亮点

  • 源码生成器 - 自动生成属性/构造函数
  • 主题切换 - 标记特性以实现Light/Dark等主题
  • 悬停交互 - 内置鼠标悬停动画支持

示例:主题切换

// 定义支持主题的属性
[Observable]
[Dark("#1E1E1E")]
[Light("White")]
private Brush _background;

// 切换全局主题
DynamicTheme.Apply(typeof(Light));

<a name="路径运动"></a>

路径运动 🛤️

拖拽设计器中的锚点,即可以指定路径控制元素移动 !

alternate text is missing from this package README image


<a name="粒子特效"></a>

粒子特效 ✨

用 Shape 作为粒子发射器 OR 粒子消散边界 , 你可轻松创建简单的粒子特效 !

alternate text is missing from this package README image


<a name="扩展工具"></a>

扩展工具 🧰

模块 功能描述
StringValidator 链式字符串验证(正则/长度/格式)
StringCatcher 结构化文本提取(中英文/数字/层级)
RGB 颜色值转换与管理
AOP 动态方法拦截与扩展

完整文档 📚

查看Wiki获取完整API参考




<a name="english"></a>

English Version

Introduction 📖

Provide an extremely simplified development experience for WPF projects, implementing functions such as transition, hover, themes, and MonoBehaviour in C#. In some scenarios, its readability is superior to that of XAML.

GitHub
NuGet


Core Features Navigation 🚀

  1. Transition System - Property animations & composite transitions
  2. V Enhancements - Source generator-driven View
  3. VM Enhancements - Source generator-driven ViewModel

Version 📦

Version Type Target Frameworks
4.x Limited Support Release .NET 5 / .NET Framework 4.6.2

📜 History

Version Highlights Release Date
v4.5.3 System topic following 2025-03-27
v4.7.0 Views are supported, not just the ViewModel 2025-04-05
v4.7.2 Gradient brush transition support & Click function block generation 2025-04-13
v4.7.5 Optimized Brush Transitions & Added BrushBuilder & Optimized Brush expression support in Theme feature 2025-04-14
v4.8.0 Optimize the initial value setting logic & add MonoBehaviour similar to Unity3D 2025-04-19

Quick Start 🚀

1. Install NuGet Package
dotnet add package MinimalisticWPF --version 4.8.0 
2. Basic Transition Animation
// Add background color transition animation  
var grid = new Grid();  
grid.Transition()  
    .SetProperty(x => x.Background, Brushes.Red)  
    .SetParams(p => p.Duration = 2)  
    .Start();  
3. MVVM Data Binding
// Auto-generated properties and constructors  
[Observable]  
private string _text = "Hello";  

<a name="transition-system"></a>

Transition System ⏳

Core Features

  • Fluent API - Chainable configuration
  • Composite Animations - Parallel/sequential multi-property animations
  • Performance Control - Adjustable frame rate/priority/threading modes

Code Example

// Create reusable animation template  
var template = Transition.Create<Grid>()  
    .SetProperty(x => x.Width, 100)  
    .SetProperty(x => x.Opacity, 0.5);  

// Apply template to multiple controls  
grid1.BeginTransition(template);  
grid2.BeginTransition(template);  

<a name="v-enhancements"></a>

View Enhancements 🧩

Key Highlights

  • Source Generators - Auto-generate dependency properties/constructors
  • Theme Switching - One-click Light/Dark mode toggle
  • Hover Interaction - Built-in mouse hover animations

Example:Theme

alternate text is missing from this package README image

<a name="vm-enhancements"></a>

ViewModel Enhancements 🧩

Key Highlights

  • Source Generators - Auto-generate properties/constructors
  • Theme Switching - One-click Light/Dark mode toggle
  • Hover Interaction - Built-in mouse hover animations

Example: Theme Switching

// Define theme-aware property  
[Observable]  
[Dark("#1E1E1E")]  
[Light("White")]  
private Brush _background;  

// Apply global theme  
DynamicTheme.Apply(typeof(Light));  

<a name="path-animation"></a>

Path Animation 🛤️

Drag anchors in the designer to define motion paths for elements!

alternate text is missing from this package README image


<a name="particle-effects"></a>

Particle Effects ✨

Use Shapes as particle emitters OR dissipation boundaries to create stunning visual effects with ease!

alternate text is missing from this package README image


<a name="utilities"></a>

Utilities 🧰

Module Functionality
StringValidator Chainable validation (regex/length/format)
StringCatcher Structured text extraction (CN/EN/digits/hierarchy)
RGB Color conversion & management
AOP Dynamic method interception & extension

Full Documentation 📚

View Complete API Reference on Wiki

Product Compatible and additional computed target framework versions.
.NET net5.0-windows7.0 is compatible.  net6.0-windows was computed.  net7.0-windows was computed.  net8.0-windows was computed.  net9.0-windows was computed. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.8.2 119 4/24/2025
4.7.5 191 4/14/2025
4.5.3 126 3/27/2025
4.5.1 456 3/26/2025
4.5.0 467 3/25/2025
4.0.0 121 2/16/2025
3.0.0 201 2/11/2025 3.0.0 is deprecated because it is no longer maintained.