CodeWF.Avalonia.DataGrid
12.2.52
dotnet add package CodeWF.Avalonia.DataGrid --version 12.2.52
NuGet\Install-Package CodeWF.Avalonia.DataGrid -Version 12.2.52
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="CodeWF.Avalonia.DataGrid" Version="12.2.52" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeWF.Avalonia.DataGrid" Version="12.2.52" />
<PackageReference Include="CodeWF.Avalonia.DataGrid" />
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 CodeWF.Avalonia.DataGrid --version 12.2.52
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeWF.Avalonia.DataGrid, 12.2.52"
#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 CodeWF.Avalonia.DataGrid@12.2.52
#: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=CodeWF.Avalonia.DataGrid&version=12.2.52
#tool nuget:?package=CodeWF.Avalonia.DataGrid&version=12.2.52
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CodeWF.Avalonia.DataGrid
官方 Avalonia DataGrid 的增强扩展:三态排序(升/降/取消)、自然排序比较器与智能 ToolTip,内置 Semi 主题入口。Enhancements for the Avalonia DataGrid control with a built-in Semi theme entry.
安装
dotnet add package CodeWF.Avalonia.DataGrid
nuget.org 上并存现行
12.1.6.x与已废弃的历史12.2.x两条版本线(后者版本号更大),浮动解析会命中旧线;请逐包精确钉版到12.1.6.*。
依赖 Avalonia.Controls.DataGrid 与 Semi.Avalonia,随包自动安装。
主题接入
<codewf:DataGridSemiTheme />
主题内部已包含 Semi.Avalonia.DataGrid 的官方 DataGrid 样式与本包增强样式,无需再单独引入 Semi 的 DataGrid 主题。
快速使用
一键启用默认增强:
using CodeWF.Avalonia.DataGrid;
dataGrid.EnableDefaults(dataGrid.ItemsSource as IEnumerable);
或用 XAML 附加属性:
<DataGrid codewf:DataGridEnhancement.UseDefaults="True" ItemsSource="{Binding Rows}" />
EnableDefaults 依次启用:
| 能力 | 方法 | 说明 |
|---|---|---|
| 三态排序 | AddSorting() |
表头点击在 升序 → 降序 → 取消 间循环,VM 侧无需处理 |
| 自然排序 | AddNaturalSorting() |
"item2" 排在 "item10" 之前 |
| 取消排序状态 | DataGridDefaultState |
取消排序时恢复原始顺序 |
| 智能 ToolTip | EnableSmartTooltips() |
单元格文本被截断时自动显示 ToolTip,可指定列 |
文档
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net11.0
- Avalonia (>= 12.1.6)
- Avalonia.Controls.DataGrid (>= 12.1.2)
- Semi.Avalonia (>= 12.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 |
|---|---|---|
| 12.2.52 | 100 | 11/21/2026 |
| 12.2.0.1 | 6 | 11/25/2026 |
| 12.1.6.9 | 143 | 11/21/2026 |
| 12.1.6.8 | 90 | 11/20/2026 |
| 12.1.6.5 | 153 | 11/16/2026 |
| 12.1.6.4 | 134 | 11/12/2026 |
| 12.1.6.3 | 127 | 11/11/2026 |
| 12.1.6.2 | 108 | 11/10/2026 |
| 12.1.6.1 | 104 | 11/10/2026 |
| 12.1.5.11 | 109 | 11/10/2026 |
| 12.1.5.10 | 112 | 11/10/2026 |
| 12.1.5.9 | 106 | 11/10/2026 |
| 12.1.5.8 | 114 | 11/9/2026 |
| 12.1.5.7 | 106 | 11/9/2026 |
| 12.1.5.6 | 137 | 11/9/2026 |
| 12.1.5.4 | 109 | 11/8/2026 |
| 12.1.5.3 | 91 | 11/8/2026 |
| 12.1.5.2 | 159 | 11/8/2026 |
| 12.1.5.1 | 91 | 11/8/2026 |
Loading failed