WPF more dynamic views and DataAnnotations
- by Ingó Vals
Comparing WPF and Asp.Net Razor/HtmlHelper I find WPF/Xaml to be somewhat lacking in creating views.
With HtmlHelpers you could define in one place how you wan't to represent specific type of data and include elements set from the DataAnnotations of the property.
In WPF you can also define DataTemplates for data but it seems much more limited then EditorTemplates. It doesn't use information from DataAnnotations.
Also the layout of elements can be bothersome. I hate having to constantly add RowDefinitions and update the Grid.Row attribute of lot of elements when I add a new property somewhere in line.
I understand that GUI programming can be a lot of grunt work like this but as Asp.Net MVC has shown there are ways around that.
What solutions are out there to make view creation in WPF a little bit cleaner, maintainable and more dynamic?