registering viewmodel as singleton does not work #2606
Unanswered
stevensrf11
asked this question in
WPF
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I registered a viewmodel and its interface as a singleton as shown
containerRegistry.RegisterSingleton<IXPubEntStatusBarWindowViewModel, StatusBarWindowViewModel>()
In code a int property on the interface is set to a value of 2.
The later when the interface is dependency injection into a constructor that property is not to 2 it is set to the default value.
How come that happens
Beta Was this translation helpful? Give feedback.
All reactions