Replies: 3 comments
|
Did you try for size to enforce the subscribers to remain inside the UI thread ?
|
|
Thank you for you reply. I figured out today, that I was subscribing to the pubsub event in the module class, not in the viewmodels. Why is it wrong to do this in the module class? |
|
No, I am leaning into saying the seniors here designed the event broadcast in a way that you can filter events on granularity of VM instances and therefore introduced the
|
Uh oh!
There was an error while loading. Please reload this page.
How to ensure that dispose function is being called and finished execution for several viewmodels when shell (app) is calling closing event using Prism6?
I was trying to register the closing event in shell code behind file and triggering a pubsub event, which is sadly never been fired within the viewmodels...
Also thinking about doing a timer in shell code, to wait for a specific time before closing the window. But this seems to be "hacky" to me.
Is there a proper way in Prism to achieve a stable disposing of resources within the viewmodels?
Any help appreciated. Thank you.
All reactions