Modernizing .NETpad: Next Steps (Premium)

We're still months away from the release of .NET 9, but there's no reason not to fully modernize WPF for Windows 11 now to the degree that's currently possible. That is, there are changes I can make using WPF's new .NET 9-based capabilities. And some changes I'd like to make that just aren't possible.

You can see the sharp divide between WPF and WinUI 3 capabilities by examining Microsoft's WPF Gallery Preview and WinUI 3 Gallery apps. I appreciate what's possible with WPF in .NET 9, but only WinUI 3 offers the full range of modern Windows 11 controls and capabilities. I could probably hack together something pretty close to the modern Notepad included now with Windows 11 in WPF, but some of its features are only possible natively with WinUI 3.

That's fine. At the very least, it helps clarify the situation. There are things I can do with the existing (WPF) app. And things that will require a new (Win UI 3/Windows App SDK) app.

For now, I will focus mostly on the existing app. And in thinking about what it means to modernize this app given the capabilities that Microsoft is making available starting with .NET 9, it's pretty clear that the work I need to do can unfold in a logical series of steps.

I completed the first of those steps back in June when I updated the app to the .NET 9 preview, enabled Windows 11 theming support, and fixed the sizing and basic look and feel of the main UI components in the main app window.

But there's more to do. This change breaks some of the app's functionality, most notably its built-in support for its own themes. And there are further sizing and look and feel fixes to make to the app's other windows, which include Font, Input box (for Find, Find/Replace, and Go to line), and About box. Fixing these issues is the next set of steps. That is, fixing these issues and just delivering the current app, as-is, but with the Windows 11 look and feel, is the initial milestone for this modernization project. And I can get that all done right now.

And so I will.

But first, I want to quickly think about the next steps to come. A more modern version of .NETpad should adopt as many of the new features that have appeared in the original Notepad in Windows 11 as possible. And it should optionally continue to outdo Notepad in certain areas, as it does now with its unique scaling and auto save features.

The single biggest new feature in Notepad is its support for tabs. You can create tabs with WPF, but I'm not sure yet whether it can be as elegant and modern-looking as is the case with Notepad, and so I'm experimenting with that now. It's possible that tabs support will require a new app, but we'll see.

Beyond tabs, most of the recent improvements to Notepad have been related to modernization. It no longer uses secondary windows of any kinds, most obviously, but instead uses modern app patterns to supply that functionality. There's a Settings page that replaces the app window, for example, and provides...

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

Thurrott