Although the Paint.Net source code is no longer available, there's a similar image editing program called Pinta which has drawn inspiration from the former. It's written in C# (although uses the GTK GUI toolkit) so the architecture from a programming point of view maybe somewhat similar. Here's the project page, and GitHub repository.