-
I understand that you can have access to WindowManager by making it an argument in the viewmodel's constructor, see below: But other than this place, how do I get access to it? Is it a singleton? If not, how can I create it? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
canton7
Nov 30, 2021
Replies: 1 comment 1 reply
-
It's got a few dependencies of its own, so its not a singleton, other than the fact it's registered as a singleton with the ioc container. You could always grab the instance in your bootstrapper and store it somewhere: protected override void Configure()
{
SomeStaticClass.WindowManager = Container.Get<IWindowManager>();
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mwdpb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's got a few dependencies of its own, so its not a singleton, other than the fact it's registered as a singleton with the ioc container.
You could always grab the instance in your bootstrapper and store it somewhere: