·11 min read
TaskPad: a 1 MB WPF task editor that installs and updates itself
Notepad is too plain for a to-do list and VS Code is too heavy, and I wanted my lists to stay plain text files. So I wrote TaskPad: a small Windows editor that turns simple markers like [ ], ! and TODO: into checkboxes and badges while the file on disk stays a normal .txt.
The part I enjoyed most was not the editor itself. It was making one 1 MB exe act as the editor, the installer, the uninstaller and the updater, and then finding out how many ways a restore-my-windows feature can go wrong.
- Role
- Creator and sole developer
- Period
- Oct 2026
- Status
- Released v1.9.4 (Oct 5, 2026)
- Stack
- C#, .NET Framework 4.8, WPF, AvalonEdit
It is a single exe with no account, so the quickest way to judge it is to run it on one of your own task lists.
Download TaskPadThe challenge
The product rule was simple: the file must stay plain text you can open anywhere. That rules out a database, a proprietary format and any rich-text trick that hides data the text cannot carry.
The second constraint was size and friction. A to-do tool has to open instantly from the Explorer right-click menu, so it needed to be small and not ask for admin rights. The README makes the same promise: one portable exe, no installer required, settings next to it.
My responsibility
I created TaskPad alone, and the history shows me owning all of it:
- The editor surface on top of AvalonEdit: marker parsing, checkboxes, badges, subtasks, code highlighting, hex colour swatches.
- Tabs, split panes, tear-out windows, the folder explorer sidebar and session restore.
- Comments, deadlines, the agenda, tray reminders and the global quick-capture hotkey.
- Import and export: Markdown, plain text, PDF through Edge, and the zipped
.taskformat. - The installer, uninstaller and updater, and cutting each GitHub release.
How I approached it
Plain text with a visual layer
The editor never changes the text to make it pretty. A LineParser reads each line and returns tokens, and a MarkerGenerator (an AvalonEdit element generator) draws a checkbox or badge over the characters that are really there. The [ ] in the file is still [ ].
public enum Tag { None, Bang, Question, Star, Arrow, Back, Dash, Slash, Todo }
public enum Check { None, Open, Done, Doing, Cancelled }
public enum TokKind { Rule, HiddenBullet, Checkbox, Tag, HeadingMark }That design keeps the file honest, and it also creates the problem in the first story below.
Comments inside the text
I wanted Google Docs style margin comments without leaving plain text. I used CriticMarkup, so a comment is just a pair of tagged spans in the line. The whole reader is one regex in Comments.cs:
public static readonly Regex Markup = new Regex(
@"\{==(?<t>.+?)==\}\{>>(?<c>.*?)<<\}|\{>>(?<c>.*?)<<\}",
RegexOptions.Compiled);A thread of replies is serialized into the second group, separated by ||, each message tagged with its author (the doc comment shows @ana 2026-10-04 12:30: first note || @ben: a reply). Deleting the last message removes the markup and keeps the highlighted text. Because it is only text, the margin panel is just a view over regex matches.
Deadlines as tokens
Deadlines follow the same idea. due:2026-10-10 18:00 in the line becomes a live countdown pill, and typing due:+3d or due:tomorrow is rewritten into a real date as you type. Due.Countdown turns a time span into text like in 3d 4h or 2d overdue, and the agenda groups every dated task from the open folder and notes into Overdue, Today, Tomorrow, This week and Later.
One exe that installs and updates itself
I wanted a download that is a single file, so AvalonEdit is embedded into the exe and resolved by hand before any WPF type needs it:
AppDomain.CurrentDomain.AssemblyResolve += ResolveEmbedded;
// ...
var name = new AssemblyName(e.Name).Name + ".dll";
using (var s = typeof(Program).Assembly.GetManifestResourceStream(name))The installer came in daa23bf (Oct 2026), and it is the same binary. If the file name contains "setup" and it is not already the installed copy, Program.Run starts the installer window instead of the editor:
public static bool IsSetupLaunch() =>
Path.GetFileNameWithoutExtension(SelfPath).IndexOf("setup", StringComparison.OrdinalIgnoreCase) >= 0 &&
!string.Equals(Path.GetFullPath(SelfPath), Path.GetFullPath(InstalledExe), StringComparison.OrdinalIgnoreCase);That is why the release has two assets, TaskPad-Setup.exe and TaskPad.exe, with identical size (1,079,296 bytes in v1.9.4). It installs per user under %LOCALAPPDATA%\Programs\TaskPad and writes only to HKCU, so it never needs admin.
The updater (c03bdda, Oct 2026) polls the GitHub releases API, downloads the new exe, checks a SHA-256 that I paste into the release notes, and swaps it in place. Windows lets you rename a running exe, and that is the whole trick:
File.Move(exe, old); // allowed while running
try { File.Copy(tmp, exe); }
catch { File.Move(old, exe); throw; }The heading marker you could not edit
Before this commit the ## marks were only painted a faint grey, and I wanted them out of the way while reading. A hidden ## has a catch: you cannot change a heading from level 2 to 3 if you cannot see the level. Commit 3ed66fd (Oct 2026) added a HeadingMark token and gave the generator a way to ask where the caret is, so it could hide the marks and still show them where you edit. The repository does not hold a state where the marks were hidden without the caret rule, so this is the design as the code and its comment explain it:
public MarkerGenerator(Func<int> caretLine = null) { _caretLine = caretLine; }
bool Skip(Tok t, DocumentLine line) =>
t.Kind == TokKind.HeadingMark && _caretLine != null && _caretLine() == line.LineNumber;The decision was to hide the # marks everywhere except on the line you are typing in. The editor wires it with new MarkerGenerator(() => ta.Caret.Line) and re-renders the old and new caret lines when the caret moves. It shipped as v1.3.1.
The window that was not there
Session restore is the feature I would never want to lose work without. TaskPad remembers windows, split layout, tabs, cursor positions and unsaved text, and brings them all back. The first version broke in a nasty way: a window could be created with nothing to show, and then it sat there invisible.
Commit 48b16bf (Oct 2026) rewrote Restore() around one rule: a window is only created if at least one of its tabs can be restored, and anything that fails is logged instead of leaving a ghost.
if (groupTabs.All(t => t.Count == 0)) continue; // nothing to show: don't create a window at all
// ...
// never keep windows that didn't make it on screen
foreach (var w in Workspace.Windows.Where(w => !w.IsVisible).ToList()) Workspace.Windows.Remove(w);Save() got the matching guard, if (!w.IsVisible || ...) continue;, so an invisible window can never be written into the next session. The same commit changed how a second launch picks its target window, so it ignores invisible ones as well. It was v1.3.5.
The comment box WPF refused to build
The last release, v1.9.4, fixed a bug that looked tiny in use: clicking the edit pencil on a comment did nothing. In 25a3d6f (Oct 2026) the diff showed the cause in one line. I had swapped the message text for a text box by assigning into the panel's children by index, and WPF does not allow that:
// a panel slot can't be overwritten in place (WPF throws): take the text out, then put the box in
int at = holder.Children.IndexOf(body);
holder.Children.RemoveAt(at);
holder.Children.Insert(at, box);That matches the release note, which says the click silently did nothing. I fixed it, then added a copy button and a right-click menu with Copy, Edit and Delete in the same commit.
A hotkey that is already taken
Quick capture needed a global hotkey, and RegisterHotKey simply fails when another program owns the combination. My first choice, Win+Alt+T, is taken by Xbox Game Bar on many PCs, as my own code comment says. So Tray.cs tries a list in order and uses the first one that registers:
foreach (var o in options)
if (RegisterHotKey(_hotkeyWindow.Handle, HotkeyId, o.Mods | MOD_NOREPEAT, o.Key)) { HotkeyText = o.Text; break; }The list is Win+Alt+N, Ctrl+Alt+N, Ctrl+Alt+Space, Win+Alt+T and Ctrl+Shift+Alt+T. The winner is kept in HotkeyText, and if none registers the failure is logged instead of crashing.
Project journey
The repository was built in a few very dense sessions. The first commit already held 31 files and 3,322 lines, and every later version was a tag within hours of the previous one.
Oct 2026
First release
f48400d: editor, markers, tabs, v1.0.0 at 778,752 bytes
Oct 2026
Comments, images, subtasks
2371d2a, then v1.1.0 and v1.2.0
Oct 2026
Updater and PDF export
c03bdda: self-update, PDF through Edge, hex swatches
Oct 2026
Installer
daa23bf: per-user setup and uninstall, v1.3.0
Oct 2026
Session restore fixes
3ed66fd, 48b16bf: hidden headings and the invisible window
Oct 2026
.task notes and folders
ebfabf9 and f8eb6cb: zipped notes, explorer sidebar
Oct 2026
Deadlines and agenda
e6563be and ac57b94: countdowns, tray reminders, quick capture
Oct 2026
v1.9.4
25a3d6f: comment editing fixed, copy added
v1.0.0
v1.3.0
v1.9.4
Beyond the launch
Most of the later work was tightening. Background updates became the default in 8f74345 (Oct 2026), the check interval went from six hours to one, and a one-time settings migration moves old ask installs to auto. The setup learned to close a running TaskPad, keep its tabs and unsaved text, and reopen it afterwards (d19b3cd). Later releases added a welcome page with an interactive tour, optional sound effects and a grouped menu.
Open limits, as the release notes say: the exe is unsigned, so Windows SmartScreen may warn on first run (More info, then Run anyway). It targets .NET Framework 4.8, which ships with Windows 10 and 11, and the checksum check only runs when the release notes carry a SHA-256 line.
The outcome
TaskPad is released and public, and the latest tag is v1.9.4. What I can verify from the repo and releases:
- One exe of 1,079,296 bytes in v1.9.4, up from 778,752 bytes in v1.0.0. The README says "under 1 MB", which is true of the early builds and now slightly off, at about 1.03 MB.
- 34 commits, 29 releases, and about 10,700 lines of C# across 39 files in
src. - Markers, comments, deadlines, agenda, PDF and Markdown export,
.tasknotes, a folder explorer, session restore and background updates.
What I would tell someone starting a similar tool: keep the file format boring and put every feature in a layer over it. Test restore paths by breaking them on purpose, because a feature that saves your work is the one that most needs to fail safely.
If you want to see how the layers fit together, start with `src/LineParser.cs` and `src/MarkerGenerator.cs`, then star the repo if it is useful.
Read the code on GitHubEvidence
- Repository: ddatunashvili/TaskPad
- Latest release: v1.9.4
- Commits relied on:
f48400d,c03bdda,daa23bf,3ed66fd,48b16bf,8f74345,d19b3cd,ac57b94,25a3d6f - Files:
README.md,TaskPad.csproj,src/Program.cs,src/Installer.cs,src/Updater.cs,src/LineParser.cs,src/MarkerGenerator.cs,src/Session.cs,src/Comments.cs,src/Due.cs,src/Tray.cs
Not verified: I did not build or run TaskPad for this write-up. Behaviour is taken from the code, commit diffs and release notes, and sizes are the release asset sizes reported by GitHub. The "about eleven hours" figure is the spread between the v1.0.0 and v1.9.4 release timestamps, and the line count is a raw wc -l of src.
#csharp#wpf#windows#desktop
Keep reading
Have a project in mind?