Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I co-sign everything here. Work with WPF as my day job (which I happen to love; great team, great company, great gig, not so great UI framework dependencies) so I feel the pain points daily.

MVVM is just hard to reason about and debug, especially with dodgy control implementations (more of an issue for UWP). It’s especially hard with converters and lack of great language tools. I also think the framework is in need of about 10 years of modernization that it just doesn’t get.

WPF (and MAUI and UWP and WinUI and UNO) would be so much better with:

- Razor for XAML: would obviate converters and a lot of other painful challenges

- Multiple styles for a single object; this is killer especially in a web context. It is really painful implementing web-oriented design systems in WPF. Tailwind for WPF would be amazing, but is more or less technologically impossible to implement due to framework limitations.

- Modern styles by default. WPF apps look bad out of the box. MS should make it easy to opt-in to a Windows 11 appearance, which this project proves is easily possible.



>Razor for XAML

I sometimes wonder if it would be easier to skip the XAML altogether and build the object model in code.


That's what I do in Forms, no XAML for me. Look at CSharpForMarkup lib that has extensions methods for Forms and now Uno to simplify coded UI's.


I seem to remember reading somewhere that the entire point of XAML and MVVM was to define a clean interface between the UI designer and the programmer. The programmer provides the view model classes and the UI designer can work on the XAML in Expression Blend without touching any code.


Microsoft believed that enough Fortune 500 companies would actually employ full-time UI designers to work visually in Expression Blend, who would seamlessly hand-off their visually-designed XAML to the implementation engs for data-binding and whatnot.

What a completely flat-out wrong expectation about the state of LoB apps. But even worse: after they saw no-one was using Blend they killed it off and made Windows 10’s default WPF look so awful, as if to retroactively punish anyone for using WPF at all.


They didn't kill Expression Blend, they just moved it into Visual Studio. It still works in Visual Studio 2022.

> who would seamlessly hand-off their visually-designed XAML to the implementation engs for data-binding and whatnot.

true, that was a wrong approach for LoB apps. But this is a fairly typical for workflow what happens with end user web apps nowadays. People use something like Figma + React instead of Bend + WPF.

Maybe MS assumed that WPF would be commonly used for end user software. Instead the web invaded the desktop in the form of electron.


Shhh... you're not supposed to say that, the emperor definitely has clothes on.


Razor for MAUI is available in the Experimental Blazor Mobile Bindings, but I doubt it will make the 7.0 cut. Having worked extensively with both XAML and Razor and Blazor, I can 100% guarantee that Razor + DI is 10x better than XAML.


I’m not convinced Blazor has staying-power.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: