I have an application with view/viewmodel stored in different xap files. I used the xap router to inform jounce of that.
The views are placed in a region with an ItemsControl and activated one at a time with a ViewNavigationArgs call and use of visual states in the views to show/hide them. Views are activated with a click on a link in a menu.
First click the view and view model are created correctly after the downloading of the xap.
Second click is the same with view/viewmodel from a second xap. The view replaced the first one, all is ok.
I click on the fiorst link : normally, the view/viewmodel are already created and initialized... Sometimes, I see with the trace messages that the InitializeVM of the ViewModel is called a second time! It's not a non-share VM...
After some clicks on differents links, I have no more unwanted calls to InitializeVM.
I protected that with a boolean flag in my VM, but when the problem arises, the view is not activated and the ItemsControl stays empty.
I hope anyone can help me and have an idea.
Thanks in advance,