
This year, Microsoft seemed to bring the Windows Presentation Foundation (WPF) back from the dead, cheering those who still support this powerful but aging app framework. This was personally exciting to me because WPF is my favorite Microsoft app framework, and it really stood out as I researched the history behind the Programming Windows series that I eventually turned into the book Windows Everywhere.
The reality of this change is slightly less exciting, however. Yes, Microsoft is formally supporting WPF alongside WinUI 3 and the Windows App SDK as a way to create modern Windows apps. But the claims Windows lead Pavan Davuluri made back in May, sadly, a mixed bag when it comes to accuracy. And it’s important to understand what’s really happening, and not get caught up in promises that may or may not ever be realized.
“With the latest updates to WPF, we have made it easier than ever to modernize the look and feel of your app through support for Windows 11 theming,” he wrote. This is true. But this is also where it ends. Microsoft has only added basic support for Windows 11 theming, and nothing more.
“Both WinUI 3 and WPF can take advantage of all Windows has to offer, including the new features and APIs in the Windows App SDK, so you can feel confident in creating a modern application in either technology,” he continued. This is untrue. WPF doesn’t support certain Windows controls, dialogs and other window types, and hundreds if not thousands of individual features that are available in WinUI 3 through the Windows App SDK (and, in many cases, MAUI and React).
Given this, it’s important to level-set your expectations. This year’s updates are mostly about modernizing the look and feel of existing WPF apps, of which there are many. But only to some degree: All the modern features available in the Windows App SDK are not at your disposal. This year’s updates are not about creating modern new apps with WPF. Yes, you could do so. But you will be limited to whatever subset of modern features that WPF supports. If you want the full range of modern Windows features, the Windows App SDK remains the only viable choice.
I know this because I’ve spent the past three and a half months working in the trenches. Back in May, I decided to dust off the WPF version of my .NETpad app and modernize it to look and feel more natural when running in Windows 11. And in early June, I started writing what became a longer-than-expected article series exploring what was possible. It was this experience that led to the conclusions above. I went through the seven stages of grief so you don’t have to. There were highs. And lows. Steps forward, steps back, and then new steps forward. There were issues with front-end features like title bar customization and tabs support, and back-end issues with theming, code quality, and then code quality again.
During this time, I’ve felt the weight of a self-imposed deadline pushing up against my desires to do it all: The Windows 11 theming support for WPF is being delivered as part of .NET 9, which Microsoft will release on November 12. I have made all kinds of progress: Despite the diversions, mistakes, and side-trips that resulted in mini-defeats, I’ve improved .NETpad as an app and its underlying code in ways I’m quite proud of. But Microsoft? It’s made no progress: It released the initial theming support for WPF as part of .NET 9 Preview 4 in May, the same week it announced all this. And then it’s done absolutely nothing ever since. Not. A. Freaking. Thing.
Which would be fine if the theming support worked. But it doesn’t, not correctly. It’s incomplete, and it has all kinds of problems that I feel should be fixed before a final, stable release in November. And yet, there’s been nothing. Not an iota of documentation, even. Just radio silence as .NET 9 Preview 5, 6, and 7 arrived over the subsequent months. This is troubling and it feels irresponsible to me. And it’s caused me to rethink what it is I can do, and in what time frame.
My overall plans are unchanged. I will modernize the WPF version of .NETpad so that it looks and works as naturally as possible in Windows 11. I will implement the full set of features it needs to bring this app as up to speed as possible with the modern version of Notepad, the subject of a successful multi-year modernization on Microsoft’s part. If Microsoft ever wakes the frick up and improves WPF’s support for Windows 11 theming between now and November, I’ll get that all done on time, too. But if it doesn’t–and I feel very strongly that it will not–then I will need to proceed in stages. I will have to temper my desire to get it all done with the reality that it is Microsoft, and not my limitations as a developer, preventing that from happening.
And I will document how anyone can take the WPF version of .NETpad, available publicly on GitHub, and do the same work, in a series of step-by-step how-to articles. I’ve already started working on that, in fact, and it was my experience going back to the original code–I’d rewritten this app so many times this summer I’d kind of forgotten the state it was originally in–that inspired me to step back for a moment and reframe this work. To have a better understanding of what has to happen, and in which order. So here we are.
There are at least three major milestones to this modernization work based on the work I’ve done to some degree of completeness so far. And then there will be further milestones that require additional improvements on Microsoft’s part. So the first steps are concrete, while the final steps are open-ended.
They are.
The basics. The project is updated from .NET 6 to .NET 9, and now targets Windows 11 and newer. Windows 11 styles are applied–theming the app to look and work normally in Windows 11–and then there’s some fine-tuning work to do because controls look different, are bigger, and have different spacing. The app’s text box and status bar need visual fixes, and then its built-in custom themes feature is removed because it clashes with the support for native Light and Dark modes in Windows 11. I documented most of this at a high level in Modernizing .NETpad: First Steps (Premium) almost three months ago, but I will write this up more formally soon. When this phase is complete, the high-level user interface looks “right” in Windows 11, but there are issues with all the app’s dialogs–which consist of both old-fashioned Message boxes and amateur custom dialogs–and much of the top-level UI–menus, settings, etc.–needs to be updated.

Next steps. In this phase, the top-level UI is updated to more closely resemble Notepad, with a lot of changes to the menu, a new settings pane, and a handful of small functional changes related to that work. The Font and About dialogs are removed as part of this work. And this is when the code refactoring happens as well: C# methods that are not control or window event handlers are moved into a separate file and app-level state variables–what I still think of as global variables–are moved out of the window code files.

Dialogs. In the third phase, I implement new custom dialogs for all the sub-windows in .NETpad, all based on a single template that is modern and correct for Windows 11. These include the Save confirmation dialog (currently implemented as a Message box), Auto save (on/off), Find/Replace, and Go to line. The description for this phase is the shortest, but the amount of work is the longest. This version of the app can be uploaded to GitHub as its own version and will form a new foundation for future work to build from.

The final frontier. If and when Microsoft ever updates its support for Windows 11 theming in WPF and/or updates it in other ways, I will implement the tabbed user interface and custom title bar used by Notepad. This could be relatively straightforward if Microsoft gets it right. Or difficult, otherwise. (Let’s share a moment of silence, please.) And this could happen over a multiple phases, as I have a few other feature updates I’d like to implement at this time if it all comes together. .NETpad will never be fully feature-compatible with today’s Notepad–I don’t believe I’ll ever figure out encoding formats, other file type support, or some of the original app’s more esoteric features–but it will also exceed Notepad in some ways too.
So there you go. That’s the plan, such as it is. I can (and will) complete the first three phases in the near future. And then rest of it is up to Microsoft.
More soon.
With technology shaping our everyday lives, how could we not dig deeper?
Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.