Is Dependency Injection part of the WinUI architecture?

659 Views Asked by At

Dependency Injection has been baked into the .NET 6 Web application architecture. I know I can add bits and pieces of DI from Microsoft.Extensions.DependencyInjection package to build a WinUI application, but I'm wondering if something more integrated to the new architecture is available.

1

There are 1 best solutions below

0
On BEST ANSWER

Is Dependency Injection part of the WinUI architecture?

No. WinUI is not an "architecture". It's a native (and in version 3 completely decoupled) UI platform component for Windows.

Having that said, you can of course implement dependency injection in your WinUI apps but there is no equivlent of the Microsoft.Extensions.DependencyInjection package included in the Windows App SDK.