Modernizing .NETpad: First Steps (Premium)

I've taken the first steps in modernizing the WPF version of my .NETpad app, and I'm excited to say I've made some progress. That said, there's lot more work to do. And it's not clear how far I can go with this existing codebase before I run into issues I'm unable to resolve.

Indeed, I've been trying to reconcile what's happening with WPF (Windows Foundation Presentation) since Microsoft's announced its return to the spotlight at Build 2024 last month. Long story short, there are now two "native" Windows app platforms, WPF and the Windows App SDK. And while neither is literally native, they are both closer to the metal, so to speak than other Windows app frameworks like React Native, which is web-based, or .NET MAUI, which is a cross-platform mobile app platform.

But WPF and the Windows App SDK target different audiences, and they aren't entirely equals in terms of functionality. Worse, each is in a weird place right now and documentation for new features and functionality is either non-existent or hard to find.

WPF is by far the older of the two, and Microsoft's formal (re)embrace of it is an acknowledgement that WPF never went away despite multiple attempts (the Windows Runtime (WinRT), the Universal Windows Platform (UWP), etc.) to replace it. The audience here is developers of existing WPF apps, many of which have been out in the world, just chugging along for years and year, but looking more and more dated: Thanks to a community-driven effort, it's become possible to modernize these existing apps so that they look more normal alongside other apps in Windows 11, in particular.

Windows App SDK is the logical endgame for Microsoft's doomed WinRT and UWP platforms. It's a desktop version of what used to be a set of mobile app platforms. Unlike its predecessors, it's not tied to any specific Windows version: Windows App SDK apps will run and look normally on any supported version of Windows (10 or 11). Technically, WinAppSDK targets two audiences: Developers of existing WinRT/UWP mobile apps who wish to modernize those apps, and developers who wish to create new "native" Windows apps. That the second of those two audiences is so small that it's essentially non-existent is, of course, obvious. But it's there if you want that option.

And so too is WPF, of course. And that's kind of an interesting problem. God help you if you wanted to create a new native Windows app for some reason, but you now have these two choices. Neither is perfect, though either would make a lot more sense than, say, using C++ and Win32 SDK like it was the 1990s again.

I may eventually look into creating a new Windows App SDK app, have indeed gone down this path in the past more than a few times. But the return of WPF into the spotlight means that I will first look at modernizing the WPF version of my .NETpad app, a Notepad clone that, today, is increasingly out-of-date because Microsoft has actually been busy updating Notepad in recent years for some...

Gain unlimited access to Premium articles.

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.

Tagged with

Share post

Please check our Community Guidelines before commenting

Windows Intelligence In Your Inbox

Sign up for our new free newsletter to get three time-saving tips each Friday

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

Thurrott © 2024 Thurrott LLC