Sep 1, 2011 at 5:49 PM
Edited Sep 1, 2011 at 6:32 PM
There are various approaches that you can use to communicate between the View and the ViewModel to inform it that the view was loaded.
One of those approaches would be making the ViewModel subscribe to the "Loaded" event using the event aggregator so the View and the ViewModel would be still decoupled. This is important since the MVVM pattern usually implies that the ViewModel isn't aware
of the specific implementation of the view related.
Another possible approach would be to create a shared service. When the Loaded event is raised, the View could use the service to inform the ViewModel that the View has been loaded.
For more information about this you can see the following chapter of the Prism documentation:
I hope you find this useful,