Modernizing .NETpad: Late Breaking Structural Changes (Premium)

By Paul Thurrott

Modernizing .NETpad: Late Breaking Structural Changes (Premium)

I sometimes have trouble focusing. No, that's not exactly right. Sometimes, the problem is that I focus on the wrong thing. And that's happened a bit since Microsoft released .NET 9 back in November. This is the .NET version that brings initial support for Windows 11 theming to WPF, the Windows Presentation Foundation, a 20-year Windows app framework that Microsoft brought back from the dead earlier in 2024.

Over five or six months, I worked to modernize the WPF version of my .NETpad app using this new theming support, describing the highs and lows in real-time, as I learned, in a series of over 25 articles (so far) what was possible and, annoying, what was impossible or, in some cases, non-optimal. The goal was two-fold: I wanted to make it more like Notepad, which has evolved dramatically in the Windows 11 era with new features, and I wanted to fix previous mistakes I had made in my app via coding and design.

I can obsess over these things. And while I am not a professional developer, a real developer, I'm still proud of the work I've done, and, maybe more to the point, feel that I am in some ways pioneering in any area where I just don't see a lot of other work. I keep hoping a professional developer will better document the issues in WPF's support for Windows 11 theming and, even better, explain how to work around those issues. But I'm alone out here, from what I can tell.

Left to my own devices--and held back by my limitations as a developer--I still did pretty good, I think. My silly little app isn't so silly or little anymore. I've modernized it inside and out, meaning it is better looking and the code quality is stronger. But I keep obsessing over the two related, major features it's missing, mostly because these features are the most obvious change(s) in Notepad. (This is actually two different things, but I feel like that's lost on mainstream users.) Those features are the tab-based user interface and title bar customization that give Notepad its modern look (and feature set) in Windows 11.

What's missing

Tabs is obvious enough, it's right there in your face. But tabs are difficult to implement because doing so requires adapting an app that previously handled and maintained state for a single document into an app that handles and maintains an essentially unlimited number of documents. That's a lot of new code, and all the resulting testing and whatnot. But there are also untold user interface issues to address, including how to handle the user opening so many new documents (tabs) that they can't be displayed in the app window. In this, I am constrained doubly. First by the limits in WPF. And then by my own limits. I have a lot to learn.

Title bar customization is, in its own way, just as complex. You can learn more about this topic on Microsoft Learn, but the short version is that developers using the Windows App SDK, a modern app framework for Windows, can customize the top of their app windows so that there's no t...

Previous articleNext article

POPULAR CATEGORY

commerce

8994

tech

9850

amusement

10936

science

5000

various

11657

healthcare

8725

sports

11608