ProDataGrid is a high-performance DataGrid control for Avalonia.
Install the package:
dotnet add package ProDataGridInclude the theme in App.axaml:
<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.v2.xaml" />
</Application.Styles><Application.Styles>
<SimpleTheme />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Simple.v2.xaml" />
</Application.Styles>Basic XAML usage:
<DataGrid ItemsSource="{Binding People}"
AutoGenerateColumns="False"
UseLogicalScrollable="True">
<DataGrid.Columns>
<DataGridTextColumn Header="ID" Binding="{Binding Id}" Width="60" />
<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*" />
<DataGridCheckBoxColumn Header="Active" Binding="{Binding IsActive}" Width="80" />
</DataGrid.Columns>
</DataGrid>The compatibility themes remain the default. Large grids can additionally load
Themes/Optimized.xaml and opt individual grids or columns into smaller retained
Avalonia templates, direct typed text access, or drawn display cells. Start with the
feature-preserving retained themes when applications rely on normal Avalonia controls,
layout, validation, automation, row details, or editing:
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Optimized.xaml" />
<DataGrid RowTheme="{StaticResource DataGridOptimizedFeatureUnfrozenRowTheme}"
CellTheme="{StaticResource DataGridOptimizedCellTheme}"
ColumnHeaderTheme="{StaticResource DataGridOptimizedFeatureColumnHeaderTheme}"
UseLightweightFiller="True" />See Optimized retained and drawn cell paths for the retained-layout, direct-content, hierarchy, binding-fallback, and drawn-display options and their compatibility trade-offs.
The optional ProDataGrid.SourceGenerators incremental analyzer produces reflection-free,
AOT-ready schemas, typed columns and fast-path accessors. It can also augment partial
ViewModels and generate operation controllers, registries, and code-only Avalonia or
ReactiveUI views, with invalid configurations reported as compile-time diagnostics.
<PackageReference Include="ProDataGrid.SourceGenerators" PrivateAssets="all" />Annotate a row model and, optionally, a partial ViewModel:
using ProDataGrid.SourceGeneration;
[GenerateDataGridColumns(ProviderName = "TradeGridSchema", Strict = true)]
public sealed class TradeRow
{
[DataGridKey]
public int Id { get; init; }
[DataGridColumn(Header = "Symbol", Order = 0)]
public string Symbol { get; init; } = string.Empty;
[DataGridColumn(DataGridColumnKind.Numeric, Header = "Price", Order = 1)]
public decimal Price { get; init; }
}
[GenerateDataGridViewModel(typeof(TradeRow), ProviderName = "TradeGridSchema")]
public sealed partial class TradesViewModel : ReactiveObject { }The generated ColumnDefinitions and FastPathOptions properties bind directly to the grid:
<DataGrid ColumnDefinitionsSource="{Binding ColumnDefinitions}"
FastPathOptions="{Binding FastPathOptions}"
AutoGenerateColumns="False" />See the source-generator guide for schema discovery, data operations, generated views, customization, and diagnostics.
ProDataGrid ships as a family of packages beyond the grid itself. Quick starts below cover the most common add-ons.
ProCharts is an Excel-quality charting library built for ProDataGrid. ProDataGrid.Charting bridges grid data and pivots into chart series.
Quick start:
dotnet add package ProCharts.Avalonia
dotnet add package ProDataGrid.Chartingusing ProCharts;
var chartModel = new ChartModel
{
Title = "Revenue by Quarter",
Series = new List<ChartSeries>
{
ChartSeries.Line("Q1", new[] { 120d, 140d, 110d, 180d }),
ChartSeries.Line("Q2", new[] { 160d, 130d, 150d, 210d })
},
XAxis = new ChartAxis { Title = "Quarter", Kind = ChartAxisKind.Category },
YAxis = new ChartAxis { Title = "Revenue", Kind = ChartAxisKind.Value }
};Bind chartModel to ProChartView.ChartModel in your Avalonia view.
The formula engine provides Excel-compatible parsing, evaluation, and recalculation. Use it in DataGrid formula columns or wire it to your own data model.
Quick start:
dotnet add package ProDataGrid.FormulaEngine
dotnet add package ProDataGrid.FormulaEngine.Excelvar definition = new DataGridFormulaColumnDefinition
{
Header = "Total",
Formula = "=[Price] * [Quantity]",
AllowCellFormulas = true
};ProDiagnostics provides Avalonia developer tools UI for runtime inspection and debugging, with optional out-of-process transport and a viewer app.
Quick start:
dotnet add package ProDiagnosticspublic override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
desktop.MainWindow = new MainWindow();
base.OnFrameworkInitializationCompleted();
this.AttachDevTools();
}Optional streaming + viewer:
dotnet add package ProDiagnostics.Transport
dotnet tool install -g prodiagnostics-viewerNightly builds are published to GitHub Packages with versions like 11.3.9-nightly.20241227.123.
Add the GitHub Packages feed (requires a GitHub token with read:packages):
dotnet nuget add source https://nuget.pkg.github.com/wieslawsoltes/index.json \
--name github \
--username YOUR_GITHUB_USERNAME \
--password YOUR_GITHUB_TOKEN \
--store-password-in-clear-textGitHub Packages NuGet docs: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry
Install a nightly package:
dotnet add package ProDataGrid --source github --prereleaseOr pin a specific nightly version:
dotnet add package ProDataGrid --source github --version 11.3.9-nightly.20241227.123Run standard tests:
dotnet testLeak tests use Avalonia-style WeakReference/GC checks. Use the helper script to run only leak tests:
.\tools\run-leak-tests.ps1ProDiagnostics provides Avalonia developer tools UI as a standalone package. It focuses on runtime inspection and debugging:
- Visual and logical tree inspection.
- Property and style inspection with live values.
- Routed event tracking.
- Layout exploration and renderer diagnostics overlays.
Install from NuGet:
dotnet add package ProDiagnosticsAttach DevTools after application initialization:
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
desktop.MainWindow = new MainWindow();
base.OnFrameworkInitializationCompleted();
this.AttachDevTools();
}By default DevTools opens with F12. You can also attach to a TopLevel or provide a custom key gesture or options.
ProDiagnostics.Transport streams metrics and activities over UDP so you can observe diagnostics out-of-process.
Install from NuGet:
dotnet add package ProDiagnostics.TransportExport diagnostics to the viewer:
using ProDiagnostics.Transport;
var exporter = new DiagnosticsUdpExporter(new DiagnosticsUdpOptions
{
Host = "127.0.0.1",
Port = TelemetryProtocol.DefaultPort,
ActivitySourceNames = new[] { "ProDataGrid.*" },
MeterNames = new[] { "ProDataGrid.Diagnostic.Meter" }
});
exporter.Start();Keep the exporter alive for the lifetime of the app and dispose it during shutdown.
ProDiagnostics.Viewer is an Avalonia UI for live metrics and activities streamed over UDP.
Install as a global tool:
dotnet tool install -g prodiagnostics-viewerRun the viewer:
prodiagnostics-viewerProDataGrid is licensed under the MIT License (see licence.md).
ProDiagnostics is licensed under the MIT License (see licence.md).
The original Avalonia.Controls.DataGrid and Avalonia.Diagnostics license is preserved in licence-avalonia.md.