Sneak C# Dependencies Into XAML Using MarkupExtension in WPF!
July 24, 2024
• 1,589 views
wpfwinuimvvmwpf mvvmwpf uixamlwpf corewpf data bindingdata bindingdotnetwpf .net corewpf data binding c#wpf controlswpf ui designwpf netwpf xamlvisual studioclean codesoftware engineeringC#mvvm wpfcoding.netview modelmodel view viewmodelmodel view view modelxaml data bindingdata binding c#front endC# wpfwpf tutorialwpf design tutorialwpf for beginnersmarkup extensionWPF markupextensiondependency injection
I'm always happy to hear about programming cheat codes.
This one is specific to WPF -- but it touches on something that's always been a pain in the butt:
Injecting services while still using XAML.
In this video, I'll walk you through how you can leverage the MarkupExtension class. This will allow you to provide more context to the XAML processor to leverage dependencies.
