XAML Is EVIL! - Fixing Anti-Patterns To Achieve Dependency Injection
July 8, 2024
• 908 views
wpfwinuinet mauimvvmwpf codewpf mvvmwpf uixamlwpf corewpf data bindingdata bindingdotnetwpf .net corewpf data binding c#wpf controlswpf ui designwpf netmvvm tutorialwpf designxaml tutorialwpf xamlformat xamlvisual studioclean codesoftware engineeringC#mvvm wpfdata binding in wpfIValueConverterbindingcodingService Locator Patternanti patternsprogramming antipatternsdependency injectionservice locator.net
I think WPF is awesome but I have a love-hate relationship with XAML.
It's unfortunately mostly hate.
While I love that I can easily get a visual layout for my user interfaces, I hate that it feels like I am fighting to get other "best practices" in place. Dependency injection is one of those.
It's a pain in the butt.
In this video, I'll walk through fixing a service locator pattern from a previous example. We'll see how we can get value converters to work with dependency injection if we forget about XAML altogether.
