ClassicPad is a lightweight, classic Notepad-inspired text editor written in C# WinForms. It recreates the familiar Windows Notepad workflow—menus, dialogs, shortcuts, and printing—while targeting modern .NET runtimes. The project is intentionally split into focused source files so each component stays easy to navigate and maintain.
- 📝 Full Notepad-style menu surface (File, Edit, Format, View, Help) with working verbs and keyboard accelerators.
- 🔍 Modeless Find/Replace, Find Next/Previous, and Go To line navigation with wrap-around search.
- 📄 Drag-and-drop loading, multi-instance launch, rich clipboard integration, and automatic dirty tracking.
- 🔡 Word Wrap, custom fonts, and zoom controls (including Ctrl+Plus/Minus/0 shortcuts) plus optional status bar.
- 🖨️ Page setup, printing, and a bundled classic notepad-style application icon (
Assets/classicpad.ico). - 🛠️ Clean architecture using WinForms partial classes (
MainWindow.*) and focused services (printing, dialogs, search).
- Windows 10 version 19041 or later.
- .NET 8 SDK (Desktop workload).
- Visual Studio 2022, VS Code, or any editor that can build .NET desktop projects.
# Clone your repo, then:
cd classicpad
dotnet build # Produces bin/Debug/.../classicpad.exe
dotnet run # Launches ClassicPad directlyThe compiled binary lives at ClassicPad/bin/<Configuration>/net8.0-windows10.0.19041.0/classicpad.exe. Copy the entire folder (the EXE plus dependencies) to redistribute.
ClassicPad/
├── App/ # Application bootstrap and session state
├── Assets/ # classicpad.ico
├── Dialogs/ # Find, Replace, Go To modal forms
├── Printing/ # TextPrintDocument for paginated output
├── Services/ # Search contracts + Find/Replace orchestration
├── UI/
│ ├── MainWindow.Core.cs # Shell, menus, status bar, drag/drop, shortcuts
│ ├── MainWindow.FileCommands.cs # File/open/save/print logic
│ └── MainWindow.EditViewHelpCommands.cs # Edit/View/Help verbs and search helpers
└── classicpad.cs # Entry point (STA)
Each file stays under ~500 LOC and includes sparse, high-signal comments when additional context helps future contributors.
| Command | Shortcut(s) |
|---|---|
| New / Open / Save | Ctrl+N, Ctrl+O, Ctrl+S |
| Find / Replace | Ctrl+F, Ctrl+H |
| Find Next / Previous | F3, Shift+F3 |
| Go To Line | Ctrl+G (disabled when Word Wrap) |
| Time/Date stamp | F5 |
| Zoom In / Out / Reset | Ctrl++, Ctrl+-, Ctrl+0 |
| Toggle Word Wrap | Format → Word Wrap |
| Toggle Status Bar | View → Status Bar (wrap off only) |
dotnet testThis command runs two suites:
ClassicPad.Testsexercises logic-only components such asDocumentSession.ClassicPad.UITestsis an STA-aware WinForms harness that instantiates dialogs/forms to verify layout guarantees (e.g., editor placement and button sizing) without needing external automation drivers.
ClassicPad ships with a WiX-based packaging script so you can generate a Windows Installer MSI without leaving the repo:
-
Install the WiX CLI once per machine:
dotnet tool install --global wix. -
Run the helper script (PowerShell):
pwsh ./scripts/build-installer.ps1 -Version "1.0.0"
The script publishes the WinForms app to artifacts/publish/<RID> and then calls WiX to emit artifacts/installer/ClassicPad-<version>-<rid>.msi. Additional parameters let you override configuration, runtime identifier, product name, and manufacturer if needed (pwsh ./scripts/build-installer.ps1 -? shows the defaults).
Contributions are welcome! See CONTRIBUTING.md for branching, coding-style, and testing guidance. Please review the Code of Conduct before participating.
ClassicPad is licensed under the MIT License.