I have an application that defines two modules, let's ModuleA and ModuleB for simplicity. Each one has it's own ViewModel, (for instance, ViewModelA, ViewModelB). When the first module (ModuleA) is loaded, ViewModelA is instantiated displaying data into ViewA (the default and only view in that module). Same for ModuleB. Each View is loaded through RequestNavigation, clicking in buttons defined in the shell, inside a RibbonView. So, Button A calls
regionManager.RequestNavigate(regionName: "ContentRegion", source: uri, navigationCallback: NavigationCompleted);
With URI parameter like:
uri = new Uri(uriString: typeof(ViewA).FullName, uriKind: UriKind.Relative);
The app is working, but the problem is this: the data displayed by ViewModelA modifies through a service class the data displayed by ViewModelB. So, when I modify data in ViewA and then I navigate to ViewB the data is still the same, forcing me to reload the entire app to see changes in ViewB. So, how can I force reloading on ViewModelB (reinstantiating or something) so each time I modify the data ViewModelA provides in ViewA the changes will be visible in ViewB?
As of now, ViewModelA and ViewModelB are populated only once, and this occurs when I register the modules in bootstrapper.
Thanx in advance.