FluentControls 0.5.0
dotnet add package FluentControls --version 0.5.0
NuGet\Install-Package FluentControls -Version 0.5.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="FluentControls" Version="0.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FluentControls" Version="0.5.0" />
<PackageReference Include="FluentControls" />
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 FluentControls --version 0.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FluentControls, 0.5.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 FluentControls@0.5.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=FluentControls&version=0.5.0
#tool nuget:?package=FluentControls&version=0.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FluentControls 设计原则和目标:
- 光影效果 (Light)
- 使用阴影表现层次
- 高亮效果展现交互状态
- 深度 (Depth)
- Z轴层级关系
- 卡片式布局
- 动效 (Motion)
- 平滑过渡
- 自然的动画曲线
- 材质 (Material)
- 亚克力效果
- 半透明模糊
- 缩放 (Scale)
- 响应式布局
- DPI自适应
控件创建流程:
public class FluentTextBox : FluentControlBase
{
// 1. 定义控件特有的属性
private string _placeholder;
private bool _isPasswordBox;
// 2. 重写主题改变方法
protected override void OnThemeChanged()
{
base.OnThemeChanged();
// 应用主题特定的样式
}
// 3. 实现绘制方法
protected override void DrawBackground(Graphics g)
{
// 绘制背景, 使用主题颜色
var bgColor = State == ControlState.Focused
? Theme.Colors.Surface
: Theme.Colors.BackgroundSecondary;
}
protected override void DrawContent(Graphics g)
{
// 绘制文本内容
}
protected override void DrawBorder(Graphics g)
{
// 绘制边框, Focus状态使用主题的BorderFocused颜色
}
// 4. 处理特定的交互逻辑
protected override void OnKeyPress(KeyPressEventArgs e)
{
// 处理键盘输入
}
}
主题应用:
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
// 应用主题
ThemeManager.ApplyTheme("FluentLight");
// 监听主题变化
ThemeManager.ThemeChanged += OnThemeChanged;
}
private void OnThemeChanged(object sender, EventArgs e)
{
// 主题改变时, 所有Fluent控件会自动更新
}
// 切换主题
private void SwitchToDarkTheme()
{
ThemeManager.ApplyTheme("FluentDark");
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | 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.8
- FluentUI.Infrastructure (>= 0.5.0)
- Newtonsoft.Json (>= 13.0.4)
- QuickLook.Typography.OpenFont (>= 1.0.1)
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 |
|---|---|---|
| 0.5.0 | 50 | 6/1/2026 |
| 0.4.3 | 76 | 4/25/2026 |
| 0.4.2 | 70 | 4/14/2026 |
| 0.4.1 | 69 | 4/6/2026 |
| 0.4.0 | 68 | 3/25/2026 |
| 0.3.3 | 68 | 3/18/2026 |
| 0.3.2 | 72 | 3/9/2026 |
| 0.3.1 | 68 | 3/3/2026 |
| 0.3.0.1 | 75 | 2/19/2026 |
| 0.2.3 | 95 | 2/11/2026 |
| 0.2.2 | 79 | 2/2/2026 |
| 0.2.1 | 80 | 1/28/2026 |
| 0.2.0 | 86 | 1/19/2026 |
| 0.1.6 | 88 | 1/12/2026 |
| 0.1.5 | 77 | 1/7/2026 |
| 0.1.4 | 84 | 1/5/2026 |
| 0.1.2 | 79 | 12/29/2025 |
| 0.1.0 | 80 | 12/28/2025 |