.NETpad 2025: Recent Documents (Premium)

Temporarily putting tabs aside has been delightfully freeing, and I spent much of the weekend making progress in other areas of the app. All the changes I describe here are in GitHub, so if you are following along, you can pull those down or just clone the DotNetPad3.2 repository again. Remember, this is work in progress, so the code is not as clean as it should be yet.

As per the title of this post, most of the work I will discuss here is related to the new File > Recent submenu. Microsoft started testing this feature in Notepad in the Dev and Canary channels back in March, and I knew I'd be adding it to .NETpad as soon as I saw it. But I also spent time on a few look and feel items, so let me blow through that quickly first.
Look and feel
Say what you will about Microsoft Edge, but one thing I've always like about the browser is how good it looks. Part of that appeal is its heavy use of WinUI iconography and fonts, both are which seem slightly upsized to match the Windows 11 design aesthetic. So as I move .NETpad away from just being a Notepad clone, I would like it to adopt a unique identity that also looks natural in Windows 11.

That first bit could be tied to color themes or whatever, similar to how the Office apps can have these really rich colored header areas. But for now, I'm starting small because I would like to eventually handle styles more elegantly. So this is basically just a series of tests for now. It's getting there, and if I finally settle on the look/feel I want, my goal is to use styles extensively instead of hard-coding things in XAML. For now, it's a mess of both.

Anyway. The first step was adding WinUI 3 icons to the items in the status bar. and then bumping up the font sizes to roughly match that Edge look and feel.

Then I did similar font updates--minus the icons, though I did test it--in the menus and, via styles, on the Settings page. I feel like adding icons to every menu item would get busy, but ... we'll see.

And then I noticed text on the custom dialogs looked too small by comparison. So I had to update those as well. There are several things I need to fix in there, so more soon. I also noticed an Auto save bug that was present before but I had forgotten about in all the tabs work. So I made a to-do for that to make sure I get to it.
Recents
My original GitHub release of this version of the app included the start of a Recents class to handle a new Recent documents feature that's accessed via a new submenu in the File menu, as per Notepad. This seems like a straightforward feature, but there's a lot to it. So I've already eliminated a lot of my original work or changed it a lot. But the basics remain the same:

Recently opened documents will display in Files > Recent along with a separator and then a "Clear list" menu item.
If there are no recently opened documents (or the user has cleared the list), the Recent submenu will have a single item, "No recent files," that is...

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