With .NET Conf 2024 and the release of .NET 9 behind us, I’ve finally had a chance to watch the relevant session videos from the show. And there is unexpectedly at least one other change to WPF’s support for Windows 11 theming, one that addresses a shortcoming I noticed over the summer.
That’s good, of course. But I wish this information were communicated more clearly, and in a more timely manner. I’ve been waiting for this kind of thing since May, literally, and for any indication at all that Microsoft would improve its dodgy but better nothing support for Windows 11 theming in WPF. And there’s been nothing but radio silence. And now that .NET 9 is available, the information is coming out in little drips, and it’s poorly communicated, and not in the right places. It’s a little disheartening. More than a little.
I don’t want to keep recapping what happened and what I’ve done so far this year to modernize the WPF version of my .NETpad app. So here I will mostly focus on the issues I’ve faced in this effort and then explain where Microsoft has–and has not–addressed them. I’m not a professional developer, and .NETpad is not a complex app, but my experiences are a good indication of what more proficient developers will face with their own modernization efforts, I think. Hopefully, the pain I’ve endured will be beneficial to others.
Simply stated, I made this app. It predates Windows 11 and was built using WPF at a time when it supported what I’ll call a classic Windows user interface. It was updated a few times since its initial release, and it still runs fine, such as it is. But it looks like a legacy app, because it is. And thanks to long-running issues with WPF, a developer framework Microsoft basically ignored for 15 years-ish, there were other limitations and workarounds that I was never happy with. And they are exacerbated in some cases by the UI changes Microsoft introduced in Windows 10 and then Windows 11.
Most obviously, the app didn’t support the new look and feel introduced by each OS version, or features like light and dark mode. Thanks to it being based on WPF, it didn’t even support common controls, and window and dialog types, that Microsoft had introduced in Windows, and in some cases subsequently abandoned, since WPF was a going concern. But developers soldiered on, and continued to use WPF, both for new apps as needed (typically in business, I’d imagine) and by maintaining existing apps. And though Microsoft pushed Metro/WinRT, the Universal Windows Platform (UWP), the Windows App SDK, and MAUI, plus related technologies like React Native, on developers in the intervening years, WPF chugged along, beloved by developers though ignored by Microsoft.
But it’s ignored no more. At Build 2024 this past May, Microsoft announced that WPF was once again a first-class citizen for Windows developers and that it would update this framework to support the native Windows 11 look and feel. And so I decided to update my app…
The post Modernizing .NETpad: WTF, WPF (Premium) appeared first on Thurrott.com.