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
                    
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="Consolonia.Controls.DataGrid" Version="11.3.12.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Consolonia.Controls.DataGrid" Version="11.3.12.6" />
                    
Directory.Packages.props
<PackageReference Include="Consolonia.Controls.DataGrid" />
                    
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 Consolonia.Controls.DataGrid --version 11.3.12.6
                    
#r "nuget: Consolonia.Controls.DataGrid, 11.3.12.6"
                    
#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 Consolonia.Controls.DataGrid@11.3.12.6
                    
#: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=Consolonia.Controls.DataGrid&version=11.3.12.6
                    
Install as a Cake Addin
#tool nuget:?package=Consolonia.Controls.DataGrid&version=11.3.12.6
                    
Install as a Cake Tool

logo

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.IsSelected used by the row template to project selection state into the caret/control visuals.
  • XAML namespace mapping for https://github.com/consolonia so 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.

  1. 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.
  1. 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.axaml and work across Consolonia themes.
  • Modern theme customization lives in Themes/Modern/Controls/DataGridRow.axaml and can be included on top of base templates.
  • If you use Consolonia.Themes, these are already wired:
    • AllControls.axaml merges the base DataGrid templates from this assembly.
    • ModernBase.axaml includes the Modern DataGridRow override 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.props VersionPrefix).
  • 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed