Consolonia.Controls.DataGrid
11.3.12.6
dotnet add package Consolonia.Controls.DataGrid --version 11.3.12.6
NuGet\Install-Package Consolonia.Controls.DataGrid -Version 11.3.12.6
<PackageReference Include="Consolonia.Controls.DataGrid" Version="11.3.12.6" />
<PackageVersion Include="Consolonia.Controls.DataGrid" Version="11.3.12.6" />
<PackageReference Include="Consolonia.Controls.DataGrid" />
paket add Consolonia.Controls.DataGrid --version 11.3.12.6
#r "nuget: Consolonia.Controls.DataGrid, 11.3.12.6"
#:package Consolonia.Controls.DataGrid@11.3.12.6
#addin nuget:?package=Consolonia.Controls.DataGrid&version=11.3.12.6
#tool nuget:?package=Consolonia.Controls.DataGrid&version=11.3.12.6

Consolonia.Controls.DataGrid
DataGrid templates, styles, and helpers for Consolonia with multi‑theme support (Avalonia 11). Extracted from Consolonia.Themes into a standalone, reusable package.
What’s inside
- Base templates for
DataGrid,DataGridRow,DataGridCell,DataGridColumnHeader, headers presenter, scrollbars, grid lines, and separators. - Theme resources tuned for text‑mode rendering (1×1 glyph cells, single‑char rules, minimal borders).
- Modern theme override that disables caret rendering inside rows to avoid visual noise during navigation.
- Attached property
DataGridExtensions.IsSelectedused by the row template to project selection state into the caret/control visuals. - XAML namespace mapping for
https://github.com/consoloniaso all helpers are usable with the standard Consolonia XMLNS.
Installation
Install from NuGet:
dotnet add package Consolonia.Controls.DataGrid
or via Package Manager:
Install-Package Consolonia.Controls.DataGrid
Target framework: net8.0
Requires: Avalonia and Avalonia.Controls.DataGrid version $(AvaloniaVersion) (kept in repo props), Consolonia.Core, Consolonia.Controls.
How to use
There are two common ways to consume the templates.
- Recommended: via Consolonia themes (no extra setup)
- If your app already uses
Consolonia.Themes(e.g.,ModernTheme,TurboVision*), the DataGrid templates are merged automatically. No additional XAML is required.
- Direct include (standalone)
- Add the resource dictionary directly in your application or theme resources:
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Styles.Resources>
<ResourceInclude Source="avares://Consolonia.Controls.DataGrid/Themes/Templates/Controls/DataGrid.axaml" />
</Styles.Resources>
</Styles>
- Optional Modern override (turns off the in‑row caret):
<StyleInclude Source="avares://Consolonia.Controls.DataGrid/Themes/Modern/Controls/DataGridRow.axaml" />
XAML namespace (for helpers/attached props):
xmlns:console="https://github.com/consolonia"
Example
<DataGrid AutoGenerateColumns="False"
ItemsSource="{Binding People}"
HeadersVisibility="Column"
CanUserSortColumns="True">
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Binding="{Binding Name}" />
<DataGridTextColumn Header="Age" Binding="{Binding Age}" />
<DataGridTextColumn Header="City" Binding="{Binding City}" />
</DataGrid.Columns>
</DataGrid>
Theme notes
- Base templates ship in
Themes/Templates/Controls/DataGrid.axamland work across Consolonia themes. - Modern theme customization lives in
Themes/Modern/Controls/DataGridRow.axamland can be included on top of base templates. - If you use
Consolonia.Themes, these are already wired:AllControls.axamlmerges the base DataGrid templates from this assembly.ModernBase.axamlincludes the ModernDataGridRowoverride from this assembly.
API surface
Consolonia.Controls.DataGrid.Helpers.DataGridExtensions:IsSelected(attached,bool) — set by styles to signal row selection for caret/visual logic.
Compatibility
- Avalonia: 11.3.x (pinned in repo to
$(AvaloniaVersion)). - Consolonia: same minor as this package (see
Directory.Build.propsVersionPrefix). - Runtime:
net8.0.
Building from source
git clone https://github.com/consolonia/consolonia
cd Consolonia/src
dotnet build
Contributing
Issues and PRs are welcome. Please see the root repository contributing.md for guidelines.
License
MIT © Consolonia contributors
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Avalonia (>= 11.3.12)
- Avalonia.Controls.DataGrid (>= 11.3.12)
- Consolonia.Core (>= 11.3.12.6)
- Consolonia.Themes (>= 11.3.12.6)
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 |
|---|---|---|
| 11.3.12.6 | 92 | 5/5/2026 |
| 11.3.12.6-alpha.2587 | 33 | 5/19/2026 |
| 11.3.12.6-alpha.2586 | 32 | 5/19/2026 |
| 11.3.12.6-alpha.2585 | 33 | 5/19/2026 |
| 11.3.12.6-alpha.2584 | 32 | 5/19/2026 |
| 11.3.12.6-alpha.2574 | 50 | 5/8/2026 |
| 11.3.12.6-alpha.2570 | 51 | 5/8/2026 |
| 11.3.12.6-alpha.2569 | 53 | 5/8/2026 |
| 11.3.12.6-alpha.2563 | 47 | 5/7/2026 |
| 11.3.12.5 | 90 | 5/1/2026 |
| 11.3.12.5-alpha.2547 | 46 | 5/5/2026 |
| 11.3.12.5-alpha.2543 | 41 | 5/5/2026 |
| 11.3.12.5-alpha.2538 | 45 | 5/5/2026 |
| 11.3.12.5-alpha.2536 | 46 | 5/5/2026 |
| 11.3.12.5-alpha.2534 | 41 | 5/5/2026 |
| 11.3.12.5-alpha.2531 | 40 | 5/5/2026 |
| 11.3.12.5-alpha.2530 | 45 | 5/5/2026 |
| 11.3.12.5-alpha.2527 | 48 | 5/5/2026 |
| 11.3.12.5-alpha.2525 | 49 | 5/5/2026 |
| 11.3.12.5-alpha.2521 | 50 | 5/5/2026 |