BUILT WITH XPF
LINQPad logo

LINQPad

by Joseph Albahari

LINQPad logo

About LINQPad

LINQPad is a beloved fixture of the .NET ecosystem — a code scratchpad, query tool, and learning environment used by developers around the world for nearly two decades. Built and maintained as a single-developer effort by Joseph Albahari, also the author of the C# in a Nutshell reference series.

When the time came to take a long-running WPF codebase to macOS without a rewrite, LINQPad chose Avalonia XPF. This is the story of why, and what they found along the way.

5M+

Downloads

30

Fortune 100 companies use it

1

Maintainer

2

Operating systems from one codebase

XPF Highlights

  • WPF code runs on XPF without porting to a new framework
  • The Actipro WPF SyntaxEditor kept working with only minor tweaks
  • Apple Silicon (ARM64) native, supporting .NET 6 through .NET 10
  • WebView2 on Windows and WKWebView on macOS, both handled by XPF's NativeWebView
  • OS shortcut keys and macOS conventions work as expected
  • One unified Windows + macOS codebase in LINQPad 9
Very happy with the decision to use Avalonia XPF: it's turned out to be a powerful and productive x-platform API, and the support has been nothing short of awesome.
Joseph Albahari· Creator of LINQPad
LINQPad 8 running natively on macOS in dark theme — schema explorer on the left, a C# query editor at the top, and a results grid showing CultureInfo data side-by-side
LINQPad running natively on macOS — built on Avalonia XPF.

A 17-Year .NET Institution, Going Mac

LINQPad first shipped in 2007, born as a LINQ-against-the-database tool and grown over the years into a general-purpose .NET scratchpad — used everywhere from quick C# experiments to production data work. It is built and maintained by Joseph Albahari, the author of the C# in a Nutshell reference books, and the team has, for almost two decades, been a team of one.

For just as long, one of the most frequent requests from the LINQPad community has been a single question: when is LINQPad coming to the Mac? The honest answer was always the same too — moving cross-platform demanded a rewrite that a one-person team could not justify. When XPF emerged as a viable path, Joe began the prep work: consolidating LINQPad's mix of WinForms and WPF onto pure WPF specifically to enable the transition, then taking the result to macOS.

Why XPF, the WPF Transition

Joe was candid about the scope of the work before committing. "Some things are much, much harder to implement than you would think," he said of the port — pointing in particular at LINQPad's data grids, which leaned on low-level Win32 APIs in ways that don't carry across to anything else for free. XPF earned its keep precisely on those edges: the parts of LINQPad that made a Mac port look impossible were exactly the parts XPF took off the critical path.

Even the third-party WPF controls came along for the ride. The LINQPad editor — Actipro's WPF SyntaxEditor — runs on XPF on macOS with only minor tweaks, a quiet but powerful proof that the broader WPF ecosystem keeps its value when a codebase moves cross-platform.

LINQPad on Windows in dark theme — a C# scratchpad showing string handling and regex examples, with results, the Roslyn syntax tree, and IL / native code panes side-by-side
To port [LINQPad] to work on our Macs, I don't even right now know how it could be done.
Joseph Albahari· Speaking before the macOS port shipped
The LINQPad macOS key-binding editor — assigning custom shortcuts for editor commands like Delete to Line End, with native Mac modifier keys (⌘, ⌥) shown in the binding list

WPF-Shaped, macOS-Native

LINQPad on macOS is not a Windows application running under translation — it is a native Apple Silicon build, supporting .NET 6 through .NET 10, that follows macOS conventions all the way down to the keyboard. Every familiar Mac shortcut works as expected, and developers can rebind any command to their own key combinations.

Getting there hinged on one technical decision: how to handle LINQPad's embedded web browser. LINQPad uses an embedded WebView heavily for displaying results, with constant back-and-forth between the host and the browser. XPF's NativeWebView control resolves that for cross-platform applications — WebView2 on Windows, WKWebView on macOS — and when LINQPad's proof-of-concept hit a blocker with it, the issue was escalated to the XPF engineering team and resolved within days. An early macOS preview was running on a single codebase within four months.

Best day of my life — been waiting for 4 years. It is soooo snappy. It works great.
wocar· LINQPad community member, on the macOS release

One Codebase Ahead — LINQPad 9

The next chapter goes one step further. LINQPad 9 is, in Joe's words, "a major update that unifies the Windows and macOS codebases, more than a year in the making" — a brand-new dark theme on Windows, customisable keyboard shortcuts, connection grouping, and the same product, end to end, on both platforms. The Windows-only era of LINQPad is officially behind it, and a single XPF codebase carries the project forward.

LINQPad 9 launching on macOS in dark theme — the splash screen displays the LINQPad 9 wordmark above a code-style "using Avalonia.XPF;" attribution, alongside "Written by Joseph Albahari" and "Version 9.7.13 (ARM64)"

LINQPad runs natively on Windows and Apple Silicon macOS. LINQPad 9 unifies the two on a single XPF codebase.

Try LINQPad

Avalonia powers production software at some of the world's leading software companies.

From financial trading floors to global manufacturers, teams choose Avalonia for cross-platform .NET reach without compromise.

Read more stories