SvcSystems.Avalonia.DynamicTableView
1.0.0-alpha.24
dotnet add package SvcSystems.Avalonia.DynamicTableView --version 1.0.0-alpha.24
NuGet\Install-Package SvcSystems.Avalonia.DynamicTableView -Version 1.0.0-alpha.24
<PackageReference Include="SvcSystems.Avalonia.DynamicTableView" Version="1.0.0-alpha.24" />
<PackageVersion Include="SvcSystems.Avalonia.DynamicTableView" Version="1.0.0-alpha.24" />
<PackageReference Include="SvcSystems.Avalonia.DynamicTableView" />
paket add SvcSystems.Avalonia.DynamicTableView --version 1.0.0-alpha.24
#r "nuget: SvcSystems.Avalonia.DynamicTableView, 1.0.0-alpha.24"
#:package SvcSystems.Avalonia.DynamicTableView@1.0.0-alpha.24
#addin nuget:?package=SvcSystems.Avalonia.DynamicTableView&version=1.0.0-alpha.24&prerelease
#tool nuget:?package=SvcSystems.Avalonia.DynamicTableView&version=1.0.0-alpha.24&prerelease
SvcSystems.Avalonia.DynamicTableView
A read-only Avalonia table backed by DynamicData, with typed column selectors and virtualized rows.
Features
- Sort, filter, search, resize, and reorder columns.
- Choose native Avalonia
GridLengthsizing: Auto (a 1* share inTableView), pixel, or weighted Star. Widths do not fit header or cell content. - Preserve selection and capture or restore column layout, filters, sorting, and scroll position.
- Customize cell templates, text wrapping, grid lines, and column minimum widths.
- Use typed selectors without reflection-based row discovery.
Install
dotnet add package SvcSystems.Avalonia.DynamicTableView
Add the compiled theme after FluentTheme in App.axaml. Because the theme is compiled into the DynamicTableViewTheme class, include it as an element rather than loading the .axaml file with StyleInclude:
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fluent="using:Avalonia.Themes.Fluent"
xmlns:table="using:SvcSystems.Avalonia.DynamicTableView"
x:Class="MyApp.App">
<Application.Styles>
<fluent:FluentTheme />
<table:DynamicTableViewTheme />
</Application.Styles>
</Application>
Quick Start
Create a cache, define columns, and assign the source to a table:
using DynamicData;
using SvcSystems.Avalonia.DynamicTableView;
var people = new SourceCache<Person, string>(static person => person.Id);
people.AddOrUpdate(new Person[]
{
new("1", "Ada Lovelace", 36),
new("2", "Grace Hopper", 85)
});
DynamicTableViewColumn<Person>[] columns =
[
DynamicTableViewColumn<Person>.Create("name", "Name", static person => person.Name),
DynamicTableViewColumn<Person>.Create("age", "Age", static person => person.Age)
];
var source = new DynamicTableViewSource<Person, string>(
people, static person => person.Id, columns);
var table = new DynamicTableView { Source = source };
public sealed record Person(string Id, string Name, int Age);
Add the table to your view and update rows through the cache with AddOrUpdate, RemoveKey, or Edit. Dispose the source and cache when they are no longer needed.
Customize
Configure column sizing and table appearance in code:
using Avalonia.Media;
using Avalonia.Controls;
columns[0].Width = new GridLength(1, GridUnitType.Star);
columns[0].MinWidth = 120;
columns[0].MaxWidth = 360;
columns[0].CellTextWrapping = TextWrapping.Wrap;
table.GridLinesVisibility = DynamicTableViewGridLinesVisibility.All;
table.CellMaxLines = 3;
Column text options override table defaults for cells without a custom CellTemplate. Use CellMaxLines = 0 for unlimited lines.
To override a column's minimum or maximum width from a style, assign a class before the column is added to the table:
columns[0].Classes.Add("wide-column");
var source = new DynamicTableViewSource<Person, string>(
people, static person => person.Id, columns);
var table = new DynamicTableView { Source = source };
Column classes are copied to the native columns and stay synchronized when changed while the table is attached. Changes made while detached are applied when it reattaches.
<Style Selector="TableViewColumn.wide-column">
<Setter Property="MinWidth" Value="120" />
<Setter Property="MaxWidth" Value="360" />
</Style>
Native TableViewColumn style values take precedence over DynamicTableViewColumn.MinWidth and MaxWidth metadata.
Column widths use Avalonia GridLength: GridLength.Auto (the default) participates as a 1* share in TableView, new GridLength(120) sets a pixel width, and new GridLength(2, GridUnitType.Star) sets a weighted share. Width is not measured to fit header or cell text.
Save And Restore
var state = table.CaptureState();
table.RestoreState(state);
Keyboard shortcuts and tap actions are application-owned: use Avalonia KeyBindings, Tapped, or DoubleTapped to add them.
Sample
Explore XAML-first and code-first examples in the sample project:
dotnet run --project samples/SvcSystems.Avalonia.DynamicTableView.Sample
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. net11.0 is compatible. |
-
net10.0
- Avalonia (>= 12.1.6)
- DynamicData (>= 9.5.0)
-
net11.0
- Avalonia (>= 12.1.6)
- DynamicData (>= 9.5.0)
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 |
|---|---|---|
| 1.0.0-alpha.24 | 0 | 11/20/2026 |
| 1.0.0-alpha.23 | 164 | 11/13/2026 |
| 1.0.0-alpha.22 | 62 | 11/12/2026 |
| 1.0.0-alpha.21 | 73 | 11/9/2026 |
| 1.0.0-alpha.20 | 60 | 11/9/2026 |
| 1.0.0-alpha.19 | 294 | 10/30/2026 |
| 1.0.0-alpha.18 | 260 | 10/29/2026 |
| 1.0.0-alpha.17 | 135 | 10/28/2026 |
| 1.0.0-alpha.16 | 69 | 10/28/2026 |
| 1.0.0-alpha.15 | 241 | 10/24/2026 |
| 1.0.0-alpha.14 | 171 | 10/22/2026 |
| 1.0.0-alpha.13 | 159 | 10/21/2026 |
| 1.0.0-alpha.12 | 64 | 10/21/2026 |
| 1.0.0-alpha.11 | 218 | 10/16/2026 |
| 1.0.0-alpha.10 | 380 | 9/30/2026 |
| 1.0.0-alpha.9 | 94 | 9/29/2026 |
| 1.0.0-alpha.8 | 66 | 9/29/2026 |
| 1.0.0-alpha.7 | 71 | 9/29/2026 |
| 1.0.0-alpha.6 | 67 | 9/29/2026 |
| 1.0.0-alpha.5 | 92 | 9/29/2026 |