Let's face it, WinForms is here to stay. Whatever new hotness comes and goes in the world of web, many developers will find themselves supporting the desktop apps of yesteryear (or yesterdecade).
The apps work, representing thousands of hours of effort and business rules, fine-tuning and bug fixes, and companies won't needlessly convert anytime soon. In truth, it might not even be wise... an app converted to a new platform could very well introduce dozens or hundreds of new bugs.
So to all my fellow devs that find themselves supporting the old coldness, let's make the best of it...
(p.s. I have other repos for C# / .NET code and misc topics, and some shorter snippets hosted on Gist and JsFiddle.)
- Using nameof to avoid magic strings (blog post, source code)
- Checking for null using the null-conditional and null-coalescing operators (blog post, source code)
- Local functions in C# (aka nested methods) (blog post, source code)
- Named arguments in C# - pass what you want and forget the rest (blog post, source code)
- String interpolation to craft readable strings (blog post, source code)
- Tuples and deconstruction for quickly returning multiple values (blog post, source code)
- A dev-friendly error box with links to the docs (blog post, source code)
- Logging errors in WinForms using NLog (blog post, source code) (part 1)
- How to log messages to multiple targets with NLog (blog post, source code) (part 2)
- Alternative ways to send notifications besides using a MessageBox (blog post, source code)
- Mocking the MessageBox (blog post, source code)
- Using MVP to test a WinForms app (blog post, source code)
- Async, CancellationToken, and IProgress in 5 Short Examples (blog post, source code)
- Calling an async method from a synchronous one (blog post, source code)
- Turning a BackgroundWorker into a Task with TaskCompletionSource (blog post, source code)
- Using Async, Await, and Task to keep the WinForms UI responsive (blog post, source code)
- Using TimeProvider and FakeTimeProvider in WinForms (blog post, source code)
CEFSharp
- Hosting a simple webpage in WinForms with CEFSharp (blog post, source code) (part 1)
- Displaying an IIS hosted site in CEFSharp (blog post, source code) (part 2)
Other interesting and helpful links, in no particular order: