Adding Dependency Injection to WPF applications

Опубликовано: 09 Ноябрь 2020
на канале: Codewrinkles
9,829
203

Here's a brief walkthrough on how we can add dependency injection into WPF apps running on #DotNetCore. As a summary, we can leverage the generic host functionality in .Net Core to add a host to our WPF app. Once we add a host we can configure the dependency injection container. One cool thing here is that you can add Window types to the DI container and then resolve and show them wherever you need.