I am developing a Prism application where I need to load some data in the model in the background after the application has loaded. I have a separate view which is hidden which would show this data via a view model. I dont want to increase the application load time and neither do I want to increase the view load time. The only solution I could think of is to raise a Shell Loaded
event and let the view model or model subscribe to it.
Is this a good approach or is there a better approach?
Also, I am not sure whether I should raise the Shell Loaded
event in the Run
of the Bootstrapper
or in the Shell ViewModel
. How do I link a routed command (for ex: Loaded) to an ICommand