Registering Views for Multi-window Application #14608
-
Hello! The relevant code looks like this:
The views are registered in
Currently, I can only open a window that uses a view once. I can "solve" the issue by not registering the view as a service, and instead creating a new instance of the view every time a window is opened. However, I am not sure if this is the right way to do things.
The code to reproduce my issue is here: Any clues as to what I should be doing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Gotten some help from SO. It seems I've been doing two things wrong:
Fixing the two points above,
|
Beta Was this translation helpful? Give feedback.
Gotten some help from SO.
It seems I've been doing two things wrong:
IServiceProvider
should be used to get the transient instance of theSubPage
serviceFixing the two points above,
MainPage
now looks like this: