No XAML Required: Native Windows Apps in Pure C#

In this dotnet session, the presenter explores how Microsoft.UI.Reactor brings the Model-View-Update (MVU) pattern to WinUI 3, with live demonstrations and a discussion of the experiment’s trade-offs.

A native Windows app in a single C# file

Microsoft.UI.Reactor is an experimental C# framework for building native Windows interfaces without XAML. The session starts by running a complete app from a single C# file:

dotnet run app.cs

The demonstrated approach requires no .csproj, App.xaml, code-behind, or ViewModels. The interface is written in ordinary C#, but the controls on screen are real WinUI controls, using the same runtime, controls, and theming as a XAML-based WinUI app.

State, hooks, and list reconciliation

The framework follows the Model-View-Update pattern: the UI is a function of application state. State lives in hooks alongside the code that uses it.

The session builds on the initial app to cover:

Catching UI bugs with Roslyn analyzers

Microsoft.UI.Reactor includes more than 60 Roslyn analyzers intended to catch UI bugs while developers type. Because the UI is expressed in C#, the .NET toolchain can work directly with the interface code rather than treating it as a separate markup layer.

An experiment alongside XAML and MVVM

The session discusses what works, what remains rough, and where the approach has fallen short. Microsoft.UI.Reactor is presented as an experiment, not a replacement for XAML and MVVM; both remain part of the Windows development landscape.

The team is actively collecting feedback on the approach, including how it fits alongside established ways of building Windows apps.