← All articles

PhialeGrid — one Core, multiple UI frameworks

PhialeGrid is a custom DataGrid component I am developing under NeptunTech for .NET business applications. The point is not to build yet another sortable table: I want to separate data and interaction behavior from the UI framework used to render it.

The WPF and Avalonia demos show multi-level grouping, summaries, editing, validation, and column configuration. Next comes a downloadable demo, then the first Preview packages.

How it is built

Coreshared by WPF, Avalonia and WinUI 3: interaction rules, selection, queries, editing, data
IGridApicommunication interfaces unrelated to events (application intents)
UniversalInputframework-neutral input events
WPFfrontend
Avaloniafrontend
WinUI 3skeleton, early stage

All grid logic lives in Core: data, state, grouping, editing, change sessions. Core talks to the frontends over two channels. IGridApi is a set of communication interfaces unrelated to events. UniversalInput is a library of framework-neutral input events shared across all platforms.

Events in WPF, WinUI 3 and Avalonia are completely different, so each frontend is a thin layer: it translates native events into UniversalInput and is responsible for rendering and native interface elements. That way the rules are written once, in Core, and not separately for every technology. The WPF and Avalonia frontends work; the WinUI 3 frontend is for now only a skeleton in an early stage of development.

Two grouping levels (department and status) with multiple aggregates for a column — running Avalonia renderer.
Two grouping levels (department and status) with multiple aggregates for a column — running Avalonia renderer.

Why build another DataGrid?

Complexity in business applications goes far beyond rendering cells. It grows around editing, staged changes, late or out-of-order backend responses, conflicts, filtering, and persistent view state. Implementing those rules independently for every UI framework makes the system harder to evolve and test.

In PhialeGrid I separate a shared Core from thin frontend adapters. Each grid instance owns its runtime. Native WPF and Avalonia events are adapted to the neutral UniversalInput protocol, while applications can use a typed API. This split works in code and has tests.

What works?

WPF. WPF is currently the more complete frontend. The demonstration application supports local data, REST data, snapshots, native editors, grouping, and a change panel.

Avalonia. The Avalonia implementation uses the shared Core and supports grouping, summaries, in-cell editing, and provider-backed data scenarios. The demo presents these features in day, night, and high-contrast themes.

Grouping, summary designer and aggregates in the WPF demonstration application.
Grouping, summary designer and aggregates in the WPF demonstration application.

What makes the architecture interesting?

  • Change sessions: cell editing, staging changes, and committing them to a backend are distinct steps. Tests cover version conflicts, partial results, and retries; server transactionality and idempotency remain backend responsibilities.
  • Grouping: one column can expose several separate aggregates, for example Sum and Average, presented as readable summary blocks.
  • Virtualization: the model separates the logical size of a dataset from records loaded in memory. One test scenario covers a million logical positions with just 50 loaded records.
An active numeric cell editor in the Avalonia grid.
An active numeric cell editor in the Avalonia grid.

Features shown in the screenshots

  • Grouping by more than one field, with expandable nested groups and sums or counts computed for the displayed groups.
  • A summary designer that lets the user select which column is aggregated and how, instead of presenting a fixed totals row.
  • In-cell editors and validation feedback, alongside selection, sorting and column configuration.
  • Separate day, night and high-contrast themes.
Avalonia — grouping and summaries in the high-contrast theme.
Avalonia — grouping and summaries in the high-contrast theme.

Why Avalonia?

Avalonia already offers data presentation controls, both free and commercial. What interests me in PhialeGrid is a particular approach: sharing behavior with WPF and building a richer model for editing, state management, and data sources. That makes it possible to evolve business applications without maintaining two separate grid engines.

Avalonia 12.1 market context ↗

What comes next?

The order will be: first a demo application to download, then NuGet packages in Preview for WPF and Avalonia. Integration documentation and usage examples will appear on NeptunTech along with them.