MinimalisticWPF 4.5.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package MinimalisticWPF --version 4.5.1
                    
NuGet\Install-Package MinimalisticWPF -Version 4.5.1
                    
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.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MinimalisticWPF" Version="4.5.1" />
                    
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.5.1
                    
#r "nuget: MinimalisticWPF, 4.5.1"
                    
#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.5.1
                    
Install MinimalisticWPF as a Cake Addin
#tool nuget:?package=MinimalisticWPF&version=4.5.1
                    
Install MinimalisticWPF as a Cake Tool

MinimalisticWPF 🎨

中文 | English

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

中文版

简介 📖

为WPF项目提供极简化的开发体验,通过C#代码直接实现前端动画、MVVM模式、路径运动等高级功能。支持源码生成器、独立过渡系统、主题切换等特性,大幅降低XAML学习成本。

GitHub
NuGet


核心功能导航 🚀

  1. 过渡系统 - 属性动画与复合过渡
  2. MVVM增强 - 源码生成器驱动的ViewModel
  3. 路径运动 - 可视化轨迹设计与控件运动
  4. 粒子特效 - 可视化粒子发射器与消散边界
  5. 扩展工具 - 字符串处理/颜色管理/AOP

完整文档 📚

查看Wiki获取完整API参考


版本矩阵 📦

版本 类型 目标框架 特性
4.x Limited Support Release .NET 5 / .NET Framework 4.6.2 基础能力 + 任何可能的扩展

快速开始 🚀

1. 安装NuGet包
dotnet add package MinimalisticWPF --version 4.4.0-pre
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="mvvm增强"></a>

MVVM增强 🧩

特性亮点

  • 源码生成器 - 自动生成属性/构造函数/依赖属性
  • 主题切换 - 一键切换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 动态方法拦截与扩展
// 示例:中文提取
var text = "Hello世界";
var result = StringCatcher.Chinese(text); // ["世界"]

完整文档 📚

查看Wiki获取完整API参考




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

English Version

Introduction 📖

A minimalist development experience for WPF projects, enabling advanced frontend animations, MVVM patterns, path-based motion, and particle effects through pure C# code. Features include source generators, an independent transition system, theme switching, and more—significantly reducing the learning curve for XAML.

GitHub
NuGet


Core Features Navigation 🚀

  1. Transition System - Property animations & composite transitions
  2. MVVM Enhancements - Source generator-driven ViewModel
  3. Path Animation - Visual trajectory design & control motion
  4. Particle Effects - Shape-based emitters & dissipation boundaries
  5. Utilities - String processing/color management/AOP

Version Matrix 📦

Version Type Target Frameworks Key Features
4.x Limited Support Release .NET 5 / .NET Framework 4.6.2 Basic capabilities + any possible extensions

Quick Start 🚀

1. Install NuGet Package
dotnet add package MinimalisticWPF --version 4.4.0-pre  
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="mvvm-enhancements"></a>

MVVM Enhancements 🧩

Key Highlights

  • Source Generators - Auto-generate properties/constructors/dependency properties
  • 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
// Example: Chinese text extraction  
var text = "Hello世界";  
var result = StringCatcher.Chinese(text); // ["世界"]  

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 (1)

Showing the top 1 NuGet packages that depend on MinimalisticWPF:

Package Downloads
MinimalisticWPF.Controls

Design some user controls based on [ MinimalisticWPF ]

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.7.0-pre 0 3/31/2025
4.5.3 87 3/27/2025
4.5.1 439 3/26/2025
4.5.0 450 3/25/2025
4.4.0-pre 126 3/17/2025
4.3.0-pre 116 3/16/2025
4.2.0-pre 187 3/5/2025
4.1.0-pre 85 2/21/2025
4.0.0 114 2/16/2025
3.0.0 102 2/11/2025