SvcSystems.Avalonia.DynamicTableView
1.0.0-alpha.14
dotnet add package SvcSystems.Avalonia.DynamicTableView --version 1.0.0-alpha.14
NuGet\Install-Package SvcSystems.Avalonia.DynamicTableView -Version 1.0.0-alpha.14
<PackageReference Include="SvcSystems.Avalonia.DynamicTableView" Version="1.0.0-alpha.14" />
<PackageVersion Include="SvcSystems.Avalonia.DynamicTableView" Version="1.0.0-alpha.14" />
<PackageReference Include="SvcSystems.Avalonia.DynamicTableView" />
paket add SvcSystems.Avalonia.DynamicTableView --version 1.0.0-alpha.14
#r "nuget: SvcSystems.Avalonia.DynamicTableView, 1.0.0-alpha.14"
#:package SvcSystems.Avalonia.DynamicTableView@1.0.0-alpha.14
#addin nuget:?package=SvcSystems.Avalonia.DynamicTableView&version=1.0.0-alpha.14&prerelease
#tool nuget:?package=SvcSystems.Avalonia.DynamicTableView&version=1.0.0-alpha.14&prerelease
SvcSystems.Avalonia.DynamicTableView
A read-only Avalonia table driven by DynamicData. Define columns with typed selectors; row members need no reflection metadata.
Install
dotnet add package SvcSystems.Avalonia.DynamicTableView
Setup
Include the theme after Avalonia Fluent. Put application overrides after the include. The compiled XAML include supports trim-enabled apps.
<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://SvcSystems.Avalonia.DynamicTableView/Themes/DynamicTableViewTheme.axaml" />
</Application.Styles>
Usage
Create a DynamicTableViewSource from an IObservableCache<T,TKey> and typed columns, then set it as the table's Source:
using Avalonia.Controls;
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);
Update rows through the cache (AddOrUpdate, RemoveKey, or Edit). The caller owns and disposes both the cache and source. Use the cache's key selector for stable selection and sorting. Filtering and sorting run on a worker scheduler; row updates and selection restoration run on the UI scheduler.
SetSort takes ownership of its descriptor array. Pass a new array for later changes; SortDescriptors is read-only.
Options
GridLinesVisibilitydefaults toNone; set it toHorizontal,Vertical, orAll. Line color follows Fluent'sTableViewColumnHeaderSeparatorBackgroundresource.- Default text cells expose table-wide defaults:
CellTextWrapping(NoWrap),CellTextTrimming(none), andCellMaxLines(one line). For example:
var table = new DynamicTableView
{
CellTextWrapping = TextWrapping.Wrap,
CellTextTrimming = TextTrimming.CharacterEllipsis,
CellMaxLines = 3
};
Each column can override these settings with its nullable CellTextWrapping, CellTextTrimming, and CellMaxLines properties. Null inherits the table setting; CellMaxLines = 0 means unlimited. For example:
columns[0].CellTextWrapping = TextWrapping.Wrap;
columns[0].CellMaxLines = 3;
These options affect cells without a custom CellTemplate; custom templates control their own text. Use a Star or Pixel column width to constrain text so it can wrap; Auto columns size to their content.
- Filter flyouts are 280 px wide by default. Override per table:
<DynamicTableView xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DynamicTableView.Resources>
<x:Double x:Key="DynamicTableView.FilterFlyoutWidth">360</x:Double>
</DynamicTableView.Resources>
</DynamicTableView>
The table does not assign actions to Enter, Delete, taps, or double-taps. Add KeyBindings or handle Tapped and DoubleTapped in the application.
Sample and benchmarks
Run the sample:
dotnet run --project samples/SvcSystems.Avalonia.DynamicTableView.Sample
Run input benchmarks in Release mode:
dotnet run -c Release --project benchmarks/SvcSystems.Avalonia.DynamicTableView.Benchmarks -- --filter '*DynamicTableViewInputBenchmarks*'
The library and tests target .NET 11; benchmarks target .NET 10. Benchmark results depend on machine and runtime.
| 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.4)
- DynamicData (>= 9.5.0)
-
net11.0
- Avalonia (>= 12.1.4)
- 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.14 | 0 | 10/22/2026 |
| 1.0.0-alpha.13 | 67 | 10/21/2026 |
| 1.0.0-alpha.12 | 39 | 10/21/2026 |
| 1.0.0-alpha.11 | 202 | 10/16/2026 |
| 1.0.0-alpha.10 | 371 | 9/30/2026 |
| 1.0.0-alpha.9 | 85 | 9/29/2026 |
| 1.0.0-alpha.8 | 58 | 9/29/2026 |
| 1.0.0-alpha.7 | 61 | 9/29/2026 |
| 1.0.0-alpha.6 | 57 | 9/29/2026 |
| 1.0.0-alpha.5 | 84 | 9/29/2026 |
| 1.0.0-alpha.4 | 55 | 9/28/2026 |
| 1.0.0-alpha.3 | 55 | 9/28/2026 |
| 1.0.0-alpha.2 | 54 | 9/27/2026 |
| 1.0.0-alpha.1 | 67 | 9/27/2026 |