In addition to implementing a tab-based user interface, the modern Notepad also does something that's a bit tricky to do well with WPF: It hides the old-school window title bar and implements its own versions of the some of the buttons that usually appear in that area, plus common window actions like windows drag and double-clicking in the title bar area to toggle restore/maximize. I will be implementing a similar interface for .NETpad. And while this work is not yet complete, it's far enough along that I can at least describe the approach I'm taking.
This comes up from time-to-time, but it's perhaps too easy to dismiss an app like Notepad as being basic and unsophisticated. I mean, it looks simple enough. But each time I've created different versions of .NETpad, I've run into features that are difficult or impossible (given my skills) to duplicate. And that's never been more true than it is now with the current modernization project: Microsoft really raised the bar when it updated Notepad to support tabs, the modern Windows 11 look and feel with support for light and dark themes, and various modern app patterns like the new settings interface.
But even those who write off Notepad as "basic" app have almost certainly noticed these changes, especially the tabs. Tied to that, Microsoft also heavily customized the top area of the app window: It no longer has a traditional title bar, despite being an old-school desktop app. But it still delivers all the features we used to get from the title bar. And so I have to do the same with .NETpad.
It's a lot of work.
It's also thankless work: After ripping out all the old-school controls found at the top of a typical desktop app window, you need to replace at least some of the functionality that these things previously provided for free. No one will notice this when it just works, but I can assure you they'll miss certain features when they're missing or don't work.
But what are these features? Among other things I may be forgetting, they include:
App icon. You click (or right-click) this icon, in the upper-left of an app window (or type Alt + Space, which works in most modern apps, too) to display the little-used application menu, which displays a little of common app window commands ("Restore", "Move", "Size", and so on). This vestigial interface is as old as Windows, and it's there so the user can control the window using only the keyboard, an act most Windows users haven't even considered in decades, if ever. But it's still there in Notepad, despite the modern makeover.
Title bar. The title bar sits at the top of an app window, where it typically displays the name of the app or some other descriptive title. In older Notepad versions, this title was formatted like Notepad - Name of document.txt, and Microsoft displayed a * character next to that title to indicate when the current document had unsaved work. The modern Notepad no longer uses a title bar, however, and there's no...
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.