WPF Prism Deploys the same instance of viewmodel in two views

So, I have two separate views in a WPF Prism application. How can I insert the same instance ViewModelinto both views through Injection Dependency?

+3
source share
1 answer

(I assume that you are using Unity, since you mentioned DI directly and donโ€™t say โ€œImportโ€ or similar)

Hi,

ViewModel ( ContainerControlledLifetimeManager) . , , . , , โ€‹โ€‹ , .

, .

+2

Source: https://habr.com/ru/post/1770058/


All Articles