.NETpad 2025: What Comes Next (Premium)

.NETpad 2025: What Comes Next

My central goal for .NETpad in 2025 is easily stated, but not so easily implemented: I want to transition the app to a tabs-based user interface. But that’s not all I’d like to accomplish with this app over the next several months. Here’s what I’m thinking.

First, this is all Microsoft’s fault

If it’s not clear, .NETpad is a Notepad clone, written from scratch, in this most recent rendition using C# and the Windows Presentation Foundation (WPF). This may seem straightforward. After, all, Wikipedia describes Notepad as “a simple text editor for Windows.” It’s not sure if that was ever true, though I used to think so. But this app has long provided sophisticated features of which many are unaware, including support for multiple encoding formats and seamless conversion of formatted text into raw text. In creating several different versions of .NETpad over several years, I’ve confronted this sophistication repeatedly and have often come up short.

But it’s gotten even more complex in recent years. Notepad has experienced a Renaissance era in which Microsoft has done the impossible: It has improved the look and functionality of Notepad dramatically without screwing it up. Today, the app looks and feels modern, supports multiple documents via a tabs-based UI, and offers an interesting session state feature (that some mislabel as Auto save), among other improvements.

Recreating all that with WPF would be next to impossible had Microsoft not brought WPF back from the dead last year as part of .NET 9 by bringing basic Windows 11 theming capabilities to the decades-old framework. But where Microsoft giveth, Microsoft also taketh away: WPF’s basic support for Windows 11 theming is buggy and, in some cases, broken. There are missing controls and, more importantly, controls that aren’t fully or easily implemented. And the “finished” version of .NETpad I posted in late December will crash hard, not because of something I did, but because of a serious bug in WPF. (Microsoft has allegedly fixed it internally.)

Point being, there are challenges. Including my own limitations as an enthusiast rather than professional developer. I’m reminded of the quip made by Clint Eastwood as Dirty Harry in Magnum Force: “A man’s got to know his limitations.”

Still, you gotta dream.

A few things I’ve already added

I foolishly made a few small changes to the app as I wound down the initial “2024” release of .NETpad instead of just focusing on the job at hand, but what the heck, that’s the yin and yang of ADHD. So after posting the source code to GitHub, I had to go back and make a few bug fixes. As a result, I’ve updated the source code a couple of times too.

Here’s what’s changed since I first posted the source code. (This is all in GitHub.)

App theme button to the main app menu bar. The crashing bug I reference above is triggered when you open an Expander control and then change the theme (between Light, Dark, and System). This is a WPF bug, but I use Expander controls in the app settings UI, just like Microsoft does with Notepad, including for App theme settings. So I added an App theme button to the menu bar in the main app UI to toggle the app theme between those three states. Then, after the fact, I changed it to display a drop-down menu with the three choices. I will eventually remove this when Microsoft fixes its bug.

Word count/character count toggle. I obviously spend a lot of time looking at Notepad and comparing it to my app. As a writer, I find word count to be much more useful than character count, but Notepad displays character count in the status for some reason. So I made that control a toggle: You can double-click it now to switch the display between word and character count.

Tooltips. Tied to the two changes noted above, I added tooltips to some of the UIs in the main app window so you can mouse-over them and see what they do. (Notepad does similarly, go figure.) I evolved this over time, so after first posting this addition, I sped up the lag between mousing over and seeing the tooltip.

System menu. While Alt + Tab always worked, I added code to display the system when you right-click the app’s icon (in the top left).

Baby steps forward

Thinking about my plan to add tabs to .NETpad, I see this work unfolding in phases. But there isn’t a clean dividing line between minor changes and major changes. Nor is there a clean dividing line between features related to tabs and features unrelated to tabs. I wish it were that simple. But I work like I work, and as I push forward, I uncover issues that weren’t previously obvious. And they need to be addressed.

But these are some things I see doing ahead of–and maybe separate from–the tabs.

App session state. This recent Notepad feature is sometimes misunderstood to be “auto save,” but that’s one feature I implemented in basic form in .NETpad that Notepad still lacks. Instead, Notepad is now configured to save the state of all open/unsaved documents so that they reappear in the app when you restart it. I disable this in Notepad, personally, but you can see why some may like or prefer it. And this is one thing I’m actively working on now, first for the current (single document-capable) .NETpad, and then for multiple documents as I start to implement tabs. This work highlighted two issues with the app: I added a DocumentPath property to my DocumentTab class after discovering that my implementation of DocumentName sometimes stored the path and sometimes didn’t. And so there was some code clean-up involved too. I’ll see about getting that up into GitHub quickly because it impacts the current version of the app too.

Settings layout auto-flow. This is unrelated to tabs. But if you look at settings in Notepad and resize the window, you’ll see that it auto-flows a bit so that the “About this app” area repositions to the right of the actual settings if the window gets wide enough. In .NETpad, this is always below the settings. I haven’t started working on this yet, but fixing it should be straightforward, so I will do so.

App window minimum widths and heights. I know I had this in some versions of the app, but the version on GitHub doesn’t current specify minimum widths and heights for the app window. It should, and so I’ve already “written” that–this wasn’t difficult, of course–and will add it to GitHub soon. Not a big deal, but an important fit and finish consideration.

The Big Kahuna: Tabs

Tabs will happen in phases and while I’m still worrying about theming issues, I have a backup plan that involves faking tabs with buttons that actually looks pretty good. So I feel like it will happen one way or the other.

I did the basic work to implement a DocumentTab class in C# already, and this is how the underlying code evolves from supporting a single document per app to a theoretically unlimited number of documents. This may not make any sense at all, but I will slowly build out the code to handle multiple documents by first working towards two or three documents (and tabs). And concurrent to this, see how well the WPF implementations of the relevant controls–TabStrip, TabControl, and TabItem–look and work before proceeding. There’s a lot of busy work here, and while this is almost certainly incomplete, I’ve identified a few UI-related things to focus on:

  • Tab header customization. The tabs in Notepad include a document name and a Close window “x” button that changes into a bullet when that document is unsaved. I can implement all that in XAML easily enough, but I’ll need to do it dynamically in C# as documents/tabs are added.
  • Add tab button. Tied to the above, there needs to be a Add tab button that sticks to its location and is always visible. Plus keyboard shortcuts.
  • Overflow issues. And tied to both those items, I have to figure out how to handle displaying multiple tabs in a small space. The default behavior is doubling up the lines of tabs, and that won’t work.

And then I’ll go from there, I guess. I’m sure unforeseen issues will come up during a lot of this.

Further out

Aside from tabs, but also further out in the future, I would like to add two other big features, both of which are present in Notepad.

Autocorrect. I added Spell check to .NETpad, but it wasn’t clear how to handle Autocorrect.

AI-powered Rewrite. This one is very recent and is only available in some markets, but it’s a cool feature. I don’t see an API in .NET, Azure/OpenAI, or OpenAI that is specifically for rewriting text, but it will happen. So I will keep an eye out and add this feature eventually.

And there you go. For now.

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