MinimalisticWPF 4.5.1
See the version list below for details.
dotnet add package MinimalisticWPF --version 4.5.1
NuGet\Install-Package MinimalisticWPF -Version 4.5.1
<PackageReference Include="MinimalisticWPF" Version="4.5.1" />
<PackageVersion Include="MinimalisticWPF" Version="4.5.1" />
<PackageReference Include="MinimalisticWPF" />
paket add MinimalisticWPF --version 4.5.1
#r "nuget: MinimalisticWPF, 4.5.1"
#addin nuget:?package=MinimalisticWPF&version=4.5.1
#tool nuget:?package=MinimalisticWPF&version=4.5.1
MinimalisticWPF 🎨
<a name="中文"></a>
中文版
简介 📖
为WPF项目提供极简化的开发体验,通过C#代码直接实现前端动画、MVVM模式、路径运动等高级功能。支持源码生成器、独立过渡系统、主题切换等特性,大幅降低XAML学习成本。
核心功能导航 🚀
- 过渡系统 - 属性动画与复合过渡
- MVVM增强 - 源码生成器驱动的ViewModel
- 路径运动 - 可视化轨迹设计与控件运动
- 粒子特效 - 可视化粒子发射器与消散边界
- 扩展工具 - 字符串处理/颜色管理/AOP
完整文档 📚
版本矩阵 📦
版本 | 类型 | 目标框架 | 特性 |
---|---|---|---|
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>
路径运动 🛤️
拖拽设计器中的锚点,即可以指定路径控制元素移动 !
<a name="粒子特效"></a>
粒子特效 ✨
用 Shape 作为粒子发射器 OR 粒子消散边界 , 你可轻松创建简单的粒子特效 !
<a name="扩展工具"></a>
扩展工具 🧰
模块 | 功能描述 |
---|---|
StringValidator | 链式字符串验证(正则/长度/格式) |
StringCatcher | 结构化文本提取(中英文/数字/层级) |
RGB | 颜色值转换与管理 |
AOP | 动态方法拦截与扩展 |
// 示例:中文提取
var text = "Hello世界";
var result = StringCatcher.Chinese(text); // ["世界"]
完整文档 📚
<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.
Core Features Navigation 🚀
- Transition System - Property animations & composite transitions
- MVVM Enhancements - Source generator-driven ViewModel
- Path Animation - Visual trajectory design & control motion
- Particle Effects - Shape-based emitters & dissipation boundaries
- 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!
<a name="particle-effects"></a>
Particle Effects ✨
Use Shapes as particle emitters OR dissipation boundaries to create stunning visual effects with ease!
<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 📚
Product | Versions 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. |
-
.NETFramework 4.6.2
- MinimalisticWPF.Generator (>= 2.6.6)
-
net5.0-windows7.0
- MinimalisticWPF.Generator (>= 2.6.6)
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.