-
Notifications
You must be signed in to change notification settings - Fork 2
Home
When WinForms functionality was ported to .Net Core it brought on a sense of nostalgia and piqued my interest in revisiting the UI from an earlier part of my career. But, my sense of interest was tempered by concerns. There were so many other newer sexier UI's out there, and coding without MVVM discipline these days seems silly. I remembered WinForms applications as plagued with spaghetti code, and the constant annoyance of figuring out how to work in the designer (or not work sometimes). The tight coupling with the designer also meant a tight IDE coupling. If your IDE didn't have a designer you were SOL.
Recently while getting ready to start a new project I did a survey of the current Windows UI ecosystem and IMHO it is currently a mess. If I were to start any desktop app right now in WPF or UAP, I would want to upgrade to at least WinUI 3 ASAP. UAP (with WinUI 2) would be closest to WinUI 3 but comes with all the sandboxed UAP constraints. WPF has a beautiful full-featured XAML and full desktop capabilities, but it isn't WinUI 3 (yet).
The current preview of WinUI 3 is really not ready for primer time. And if I were going to start coding in WPF or UAP, or WinUI 3 (preview), why not just go to the ultimate finally target of MAUI? Or even Blazor desktop (as an alternative to Electron)? Then I would be cross-platform too. But, MAUI is even less ready for prime time. Although Xamarin had a cool fluent C# Markup syntax they were starting to use for building UI's that looked just like what I wanted. I am sure by the end of November 2021, this state will alleviate itself.
I had been doing more Kotlin coding recently and saw that some of the newer features in C# seemed to be informed by innovations in other languages (like Kotlin). I had also seen the power of a DSL and typesafe builder pattern in Kotlin to make even ugly class systems useable (like TornadoFX did for JavaFX). Then I saw that ReactiveUI gave WinForms some love too! So, I had a good MVVM framework, for less spaghetti code, and had seen the power of DSLs.
WinForms has been around forever. It's just chugged along not raising a fuss. Sure, it may have been in maintenance mode until being open-sourced in 2018. And it's kind of the homely step-child to the rest of the sexy newer UIs. But, WinForms just works. And I can make an application today. Using .Net 5 I also get some of the cooler new C# features (ala Kotlin). If I could put a nice DSL wrapper around it, and use Reactive UI for MVVM, I would have something that was good enough. And has been good enough since 2002.
So, I'd started my new project, and I started building the UI with a DSL as I went along (just a bunch of extension methods really). When I realized that they could be useful as a stand-alone library, I decided to share the love. ❤
Thus, WinFormMarkup was born. Once the library gets to a sufficient level of completeness, and if there appears to be any interest in it, I intend to release a Nuget package. I've already added licensing, so it is usable now.
2021-06-05 bigtlb