Description
Proposal: Evolve XAML Syntax to also support a more Razor/Blazor-like syntax
Summary
I saw @jeromelaban today show an experiment with using Blazor-like syntax for XAML, and I think this would be a good evolution of XAML:
Rationale
I've for a long time thought that XAML needed to evolve more beyond it's initial incarnation from WPF, and make xaml more succinct and efficient to write. We've seen this happen with ASP.NET which is almost not recognizable today compared to where it started, with much much less markup and code needed to create great UIs.
I think this flavor has several benefits:
-
First it's still very much XAML-like reusing the same tags, and simplifying bindings.
-
It removes the need for code-behind for UI specific code, and drives you towards better separation between UI code-behind and VM/Model code. The current model drives people to add too much in code-behind, beyond just view-specific code.
-
The syntax will be very familiar to those already using ASP.NET MVC / Blazor.
-
Way more succinct
This article is a pretty good take on why it's time for XAML to evolve (note it has now been 14 15 16 17 years): https://paulstovell.com/six-years-of-wpf/