Closed simonndev closed 7 years ago
I dont know how to set the label to #WPF, please help me update the post. Thanks in advance.
IActiveAware does not fire twice. You have something else in your code causing this issue. As to your question, there are number of approaches you can take. Continure to use IActiveAware, use INavigationAware in combination with the navigation framework, or just load your data in the ctor of the class so when it is created, you are already loading the data. I'm sure there are more ways to do it.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Package info
Repro steps
Create a module implements IModule
Create a view
Create a ViewModel that implements IActiveAware
With the current version of Prism 6.3.0 (Unity for WPF), My MainView was initialized twice, so my ViewModel will be triggered to call the GetFeatures() method which will send a request to a WebApi to get JSON result twice.
Is it normal behavior of the RegisterViewWithRegion to IActiveAware? If yes, please show me a way how can I call GetFeatures() in my view-model once. Thank you.